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

option to disable colors #4

Open
stephenmathieson opened this issue Jul 27, 2016 · 0 comments
Open

option to disable colors #4

stephenmathieson opened this issue Jul 27, 2016 · 0 comments

Comments

@stephenmathieson
Copy link

they're just noise outside of development. i'd rather not have to pipe my logs through something to remove ansi escape sequences in order to view them.

maybe we could add something like:

const logger = getLoggerSomehow()
const logMiddleware = require('winston-koa-logger')

app.use(logMiddleware(logger, {
  disableColors: true
}))

or better yet, internally, we could say:

const shouldUseColors = tty.isatty(X) && process.env.NODE_ENV !== 'production'

so that apps didn't have to disable this stuff upstream ;)

reubn pushed a commit to reubn/winston-koa-logger that referenced this issue Oct 4, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants