-
Notifications
You must be signed in to change notification settings - Fork 258
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
Custom log levels #636
Comments
Hi @koraa 👋 That’s an interesting design direction. I don’t think we’re likely to complicate level management in This is something you could possibly use the existing I think we could also benefit from potentially enhancing our |
Hi @KodrAus thanks for the detailed response! An elegant way to add Key/Value type data to your metadata type would be great; this could directly be used to implement sublevels. A mechanism based on static or dynamic polymorphism instead of a hash map would be optimal to avoid heap allocations during logging. This would also help to globally identify keys. If arbitrary strings where used as keys, there is a danger to get keys from different crates mixed up. Anyway, thanks for the hard work on this crate! |
Take a look at the
I've used special
|
Hi,
thank you all for writing a fantastic piece of software.
I am aware of #334.
My particular use case is having a log level "responsive" between warn and info.
rosenpass/rosenpass#326
Our goal is to be:
Essentially be responsive without polluting logs.
Some ideas how to – cleanly – implement custom log levels:
::log_level_critical::CRITICAL
or log level::rosenpass::util::log::level::RESPONSIVE
which would be distinct from::log_level_responsive::RESPONSIVE
. This would allow clean reasoning about custom log levels across crates.The text was updated successfully, but these errors were encountered: