-
Notifications
You must be signed in to change notification settings - Fork 279
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
feat(logger): use RUST_LOG-like EnvFilter for logging #4837
Conversation
@BAStos525 this change is backward compatible, so previous values for |
why is default |
idk, lowest possible level is assumed by tracing crate |
Signed-off-by: Shanin Roman <shanin1000@yandex.ru>
Signed-off-by: Shanin Roman <shanin1000@yandex.ru>
Signed-off-by: Shanin Roman <shanin1000@yandex.ru>
Signed-off-by: Shanin Roman <shanin1000@yandex.ru>
Signed-off-by: Shanin Roman <shanin1000@yandex.ru>
Description
Replace level filter with
EnvFilter
which support setting specific log level for different iroha modules.Examples
The same can be done through configuration in config.toml.
Linked issue
Closes #4829
Benefits
More granular control over logging.
Downsides
It's harder to check correctness for example if someone would write
LOG_LEVEL=infa
iroha won't return any error because this would be parsed as accept logs from moduleinfa
attrace
level.I believe we can mitigate this, by custom parsing, but it would make our type more strict than orginal
EnvFilter
.It's smt i would prefer to leave for separate PR.