bunyan-format icon indicating copy to clipboard operation
bunyan-format copied to clipboard

Cannot use bunyan-format outputMode when streams are already declared

Open ecahill opened this issue 10 years ago • 3 comments

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
    }
  ]

ecahill avatar Mar 03 '16 16:03 ecahill

I second that. In my case, I would like to log into a file, but keeping the short format

davidmorabito avatar Nov 16 '17 04:11 davidmorabito

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'})
  })

k2s avatar Jan 26 '18 23:01 k2s

Me too. I am trying to use the logger format in conjunction of writing to a file.

nayanchandni avatar May 04 '20 21:05 nayanchandni