A splunk (over HEC) transport for the winston logging toolkit.
npm install --save winston winston-splunk-hec
var winston = require('winston');
var SplunkTrasport = require('winston-splunk-hec');
var TransportOpts = {
level: 'info',
splunkUrl: 'https://yoursplunk.company/services/collector',
splunkHec: '1234-5678-9123-4567',
};
var logger = winston.createLogger({
transports: [
new SplunkTrasport(TransportOpts)
]
});
level
[info
] Messages logged with a severity greater or equal to the given one are logged to ES; others are discarded.buffering
[true] Boolean flag to enable or disable messages buffering. ThebufferLimit
option is ignored if set tofalse
.bufferLimit
[null] Limit for the number of log messages in the buffer.SplunkUrl
Url for splunk HEC endopintSplunkHec
HEC token