feat(logger): use RUST_LOG-like EnvFilter for logging#4837
Merged
Erigara merged 5 commits intohyperledger-iroha:mainfrom Jul 12, 2024
Merged
feat(logger): use RUST_LOG-like EnvFilter for logging#4837Erigara merged 5 commits intohyperledger-iroha:mainfrom
Erigara merged 5 commits intohyperledger-iroha:mainfrom
Conversation
Contributor
Author
|
@BAStos525 this change is backward compatible, so previous values for |
Contributor
why is default |
DCNick3
reviewed
Jul 11, 2024
Contributor
Author
idk, lowest possible level is assumed by tracing crate |
mversic
reviewed
Jul 12, 2024
mversic
reviewed
Jul 12, 2024
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>
mversic
approved these changes
Jul 12, 2024
DCNick3
approved these changes
Jul 12, 2024
0x009922
added a commit
to 0x009922/iroha
that referenced
this pull request
Mar 28, 2025
…outes Close hyperledger-iroha#5365 Close hyperledger-iroha#5247 Revert hyperledger-iroha#4837 Signed-off-by: 0x009922 <43530070+0x009922@users.noreply.github.com>
0x009922
added a commit
to 0x009922/iroha
that referenced
this pull request
Mar 28, 2025
…outes Close hyperledger-iroha#5365 Close hyperledger-iroha#5247 Revert hyperledger-iroha#4837 Signed-off-by: 0x009922 <43530070+0x009922@users.noreply.github.com>
0x009922
added a commit
to 0x009922/iroha
that referenced
this pull request
Mar 31, 2025
…outes Close hyperledger-iroha#5365 Close hyperledger-iroha#5247 Revert hyperledger-iroha#4837 Signed-off-by: 0x009922 <43530070+0x009922@users.noreply.github.com>
0x009922
added a commit
that referenced
this pull request
Apr 4, 2025
…outes (#5384) * refactor: revert `logger.level`, add `logger.filter`, extend config routes Close #5365 Close #5247 Revert #4837 Signed-off-by: 0x009922 <43530070+0x009922@users.noreply.github.com> * test: fix torii pytests Signed-off-by: 0x009922 <43530070+0x009922@users.noreply.github.com> --------- Signed-off-by: 0x009922 <43530070+0x009922@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Replace level filter with
EnvFilterwhich 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=infairoha won't return any error because this would be parsed as accept logs from moduleinfaattracelevel.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.