new SplunkStream(config)
A class that implements a raw writable stream.
Parameters:
Name | Type | Description | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
config |
object | Configuration settings for a new SplunkLogger.
Properties
|
Properties:
Name | Type | Description |
---|---|---|
config |
object | Configuration settings for this SplunkStream instance. |
contextQueue |
Array.<object> | Queue of context objects to be sent to Splunk. |
error |
function | A callback function for errors: function(err, context) .
Defaults to console.log both values; |
- Implements:
- Source:
Members
logger :SplunkLogger
Type:
- SplunkLogger
Methods
config() → {Object}
Returns the configuration for this logger.
See SplunkStream.
Returns:
Configuration for this logger.
- Type
- Object
send()
A callback function called after sending a request to Splunk:
function(err, response, body)
. Defaults
to an empty function.
write(data)
The
write()
function for SplunkStream
.
Bunyan will call this function when a user logs a message.
See Bunyan raw streams.
Parameters:
Name | Type | Description |
---|---|---|
data |
object | The data object is provided by Bunyan. |