bunyan-format
bunyan-format copied to clipboard
Cannot use bunyan-format outputMode when streams are already declared
If my bunyan logger is created using the following streams, is it still possible to use bunyan-format short output mode?
streams: [
// Log INFO and above to stdout.
{
level: 'info',
stream: process.stdout
},
// Log ERROR and above to stderr.
{
level: 'error',
stream: process.stderr
}
]
I second that. In my case, I would like to log into a file, but keeping the short format
this works for me with addStream, doesn't work when defined within streams array
logger.addStream({
level: verbose ? 'debug' : 'info',
stream: require('bunyan-format')({outputMode: 'short'})
})
Me too. I am trying to use the logger format in conjunction of writing to a file.