Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot use bunyan-format outputMode when streams are already declared #6

Open
ecahill opened this issue Mar 3, 2016 · 3 comments
Open

Comments

@ecahill
Copy link

ecahill commented Mar 3, 2016

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
    }
  ]
@davidmorabito
Copy link

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

@k2s
Copy link

k2s commented Jan 26, 2018

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

@nayanchandni
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants