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

Inconvenient logging levels and logging target formats #373

Open
dpc opened this issue Nov 16, 2023 · 1 comment
Open

Inconvenient logging levels and logging target formats #373

dpc opened this issue Nov 16, 2023 · 1 comment

Comments

@dpc
Copy link

dpc commented Nov 16, 2023

In a context of a larger application AlephBFT crate logs a lot of errors on high levels for things that are normal and expected during typical use, even if "an error", or "warning" in the context of AlephBFT's internals. Please note that rust logging levels are global and shared for all the crates of the application, so the deeper "in the stack" given library is, the less the chance that certain logging statement is really relevant to the end user.

These logging messages are also cryptic and not useful for anyone that is not intimately familiar with its internals.

On top of it, AlephBFT currently makes it really inconvenient to disable or silence its log messages. The target: in logging statements is meant to be (and defaults to) a Rust module path. So the separator use for the hierarchical structure is ::, like Rust modules. Had it been:

info!(target: "alephbft::extender", ...);

etc. it would be natural to disable all alephbft logging with:

env RUST_LOG=info,alephbft=off

but since AlephBFT-xyz is used, this is not the case.

@dpc
Copy link
Author

dpc commented Nov 16, 2023

Correction: It seems that tracing_subscriber does use string prefix based matching so RUST_LOG=AlephBFT-=off might actually work. But it still seems to me that keeping it module-like is ideal.

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