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 in log output #69

Open
jamiemjennings opened this issue Jun 6, 2018 · 2 comments
Open

Option to disable colors in log output #69

jamiemjennings opened this issue Jun 6, 2018 · 2 comments

Comments

@jamiemjennings
Copy link

jamiemjennings commented Jun 6, 2018

Our use case for koa-logger doesn't allow for color codes in the output. We're currently using the strip-ansi module to strip those out, however it would be preferable if we could simply disable colored output in the logger options.

ie, something like this:

const logger = require('koa-logger')
const Koa = require('koa')

const app = new Koa()
var loggerTransport = function () { ... }
var loggerConfig = { colorOutput: false }
app.use(logger(loggerTransport, loggerConfig))

Has this been considered? It seems like it would be fairly straightforward to implement. I can submit a PR if the maintainers are open to the idea.

@haoxins
Copy link
Member

haoxins commented Jun 13, 2018

PR welcome :)

@AntonisFK
Copy link

Any updated on this?

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

Successfully merging a pull request may close this issue.

3 participants