1.1.1 • Published 6 years ago
winston-splunk-hec v1.1.1
winston-splunk-hec
A splunk (over HEC) transport for the winston logging toolkit.
Installation
npm install --save winston winston-splunk-hecUsage
var winston = require('winston');
var SplunkTrasport = require('winston-splunk-hec');
var TransportOpts = {
level: 'info'
};
var logger = winston.createLogger({
transports: [
new SplunkTrasport(TransportOpts)
]
});The winston API for logging can be used with one restriction: Only one JS object can only be logged and indexed as such. If multiple objects are provided as arguments, the contents are stringified.
Options
levelinfoMessages logged with a severity greater or equal to the given one are logged to ES; others are discarded.bufferingtrue Boolean flag to enable or disable messages buffering. ThebufferLimitoption is ignored if set tofalse.bufferLimitnull Limit for the number of log messages in the buffer.SplunkUrlUrl for splunk HEC endopintSplunkHecHEC token