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

How get the colors in custom Format and Transport? #1425

Open
1 of 2 tasks
adoyle-h opened this issue Aug 2, 2018 · 0 comments
Open
1 of 2 tasks

How get the colors in custom Format and Transport? #1425

adoyle-h opened this issue Aug 2, 2018 · 0 comments

Comments

@adoyle-h
Copy link
Contributor

adoyle-h commented Aug 2, 2018

Please tell us about your environment:

  • winston version?
    • winston@2
    • winston@3
  • node -v outputs: v8.9.1
  • Operating System? macOS
  • Language? ES6

What is the problem?

Current definitions:

  • (info, opts) => {} in Format
  • log(info, callback) in Transport
  • info Object

It seems no way to get colors passed from winston.addColors(myCustomLevels.colors);.

I want to implement a custom console transport which prints messages with color in a different style.

What do you expect to happen instead?

(info, opts) => {
  console.log(info.colors);   // get colors from info object
}

Other information

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