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

Support customising levels for multiple transports #1538

Closed
fenos opened this issue Aug 30, 2022 · 5 comments
Closed

Support customising levels for multiple transports #1538

fenos opened this issue Aug 30, 2022 · 5 comments

Comments

@fenos
Copy link

fenos commented Aug 30, 2022

Hello, we all love pino!

However, i do not understand why i cannot have the level in my logs as a label when using multiple transports.
It seems a weird limitation

#ref https://github.com/pinojs/pino/blob/master/lib/tools.js#L284

Is there any workaround for now?

@jsumners
Copy link
Member

Have you reviewed the issue that resulted in that code? #1353

@fenos
Copy link
Author

fenos commented Aug 31, 2022

Hello @jsumners

Yes, i've had a look at the issue you linked, however even by using the mixin function i'm still unable to customise the level property.

I can only add an alternative key ex: level-label

My main problem is that i started using pino with a single transport then added a second one later on, since i'd like to keep my schema consistent and still retain the level key to be the equivalent label is there a way to achieve this?

@mcollina
Copy link
Member

Not at this time, I think it's possible to drop the limitation but it requires some work on pink. Would you like to send a PR?

@VladimirMikulic
Copy link
Contributor

Hi @fenos - did you find some workaround?

@github-actions
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 20, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants