logger
logger copied to clipboard
Option to disable colors in log output
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.
PR welcome :)
Any updated on this?