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

Should colorize log level AFTER logFormat #64

Open
cryptiklemur opened this issue Nov 28, 2016 · 0 comments
Open

Should colorize log level AFTER logFormat #64

cryptiklemur opened this issue Nov 28, 2016 · 0 comments

Comments

@cryptiklemur
Copy link

cryptiklemur commented Nov 28, 2016

With the currently flow, certain things are not possible, while colorizing with a log format.

e.g.

new winston.transports.Papertrail({
    host:      process.env.LOG_HOST,
    port:      process.env.LOG_PORT,
    colorize:  true,
    logFormat: function(level, message) {
        return level.toUpperCase() + ' | ' + message;
    },
    program:   os.hostname()
})

as the colorized level, is uppercased as well, becoming [32MINFO[39M instead of [32mINFO[39m

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

1 participant