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

Decolorize not working for level #162

Open
dnlaviv opened this issue Jul 5, 2019 · 1 comment
Open

Decolorize not working for level #162

dnlaviv opened this issue Jul 5, 2019 · 1 comment

Comments

@dnlaviv
Copy link

dnlaviv commented Jul 5, 2019

Hey all, love your project!
I noticed that decolorize option is not working on the level option as expected:

const mongoSettings = { db: MONGO_URL, metaKey: 'meta', decolorize: true };
const logger = createLogger({
    format: combine(
        colorize(),
        json(),
        timestamp(),
        logFormat(),
    ),
    transports: [
        new transports.Console(),
        new transports.File({ filename: 'app.log' }),
        new transports.MongoDB(mongoSettings),
    ],
});

Here's what's beed saved:

// my mongo document:
"level" : "\u001b[32minfo\u001b[39m",

am I missing something?

@gustavomassa
Copy link

Hey,

37ad841

This pull request fixed the issue, but a a release is pending..
For now you can use your package.json pointing to master branch:
"winston-mongodb": "git://github.com/winstonjs/winston-mongodb.git",

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

2 participants