-
Notifications
You must be signed in to change notification settings - Fork 886
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
formatters level set label cant transport #1353
Comments
It is not clear what you are asking. Please review https://docs.github.com/en/get-started/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax#quoting-code and provide a minimal reproduction of your problem. |
|
Hey @mcollina, I've opened a pull request to solve this issue and added some info about it to the docs, could you review it and let me know if there's something wrong? |
The issue is actually just that level is not the numeric label. I was actually running with multiple transports, with a level formatter of
And it was working fine. All transports got logged as expected. Is there some other way to achieve an outcome such as this on the latest release of pino? |
I don't think so, the system is not designed in that way. A PR that improves on it would be awesome. |
@mcollina is there a reason the default formatter does not include the label, or an option to this effect? Would a change such as this be acceptable? All I really want is the friendly level label to get to the logs so people don't need to know in logstash for example, that 30 is 'info'. I'm happy to make a PR, but what kind of change would be acceptable here? Now that the code throws an error, I cannot do what I was doing before that worked just fine, which in my mind is a regression, even if it was not by design. As I said, I'm happy to make a PR, but would appreciate some guidance on how such an outcome could be achieved. |
Instead of validating if the |
@mcollina That could work, and I'd be happy to do that. I was just going through the code, and I have two other options that would solve my issue that might be more appropriate.
Option 2 would allow me to easily call the instance.levels() method and achieve the same outcome cleanly. Thoughts? |
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. |
why set level => label, cant record the log, test.log is empty?
"pino": "^7.8.0"
The text was updated successfully, but these errors were encountered: