Added reference for the formatter transport parameter found in winston so as to support its usage in this extension. In regular winston transports this works like so:
var logger = new (winston.Logger)({
transports: [
new (winston.transports.Console)({
timestamp: function() {
return Date.now();
},
formatter: function(options) {
// Return string will be passed to logger.
return options.timestamp() +' '+ options.level.toUpperCase() +' '+ (options.message ? options.message : '') +
(options.meta && Object.keys(options.meta).length ? '\n\t'+ JSON.stringify(options.meta) : '' );
}
})
]
});
And now it should work with winston.transports.Rotate as well.
Added reference for the
formatter
transport parameter found in winston so as to support its usage in this extension. In regular winston transports this works like so:And now it should work with
winston.transports.Rotate
as well.