Repository navigation
Logging: say so when VICTORY_LOG or RUST_LOG does not parse - #266
Closed
SkippySteve wants to merge 1 commit into
Closed
SkippySteve wants to merge 1 commit into
SkippySteve wants to merge 1 commit into
Conversation
A filter that tracing-subscriber rejects, such as VICTORY_LOG=victory_loader=loud, was dropped without a word and the binary logged at its default level, so a typo looked like the target had nothing to say. init now prints one line on stderr naming the variable, its value and the parse error, then uses the default as before. Choosing the filter moves into choose_filter so it can be tested without touching the process environment; five unit tests cover unset, VICTORY_LOG over RUST_LOG, the RUST_LOG fallback, and a bad value in each variable.
Author
|
Superseded by #241, which now carries this commit (warn on a bad VICTORY_LOG/RUST_LOG) unchanged. |
muhammed-aksoy
pushed a commit
to muhammed-aksoy/VIctory
that referenced
this pull request
Nov 24, 2026
muhammed-aksoy
pushed a commit
to muhammed-aksoy/VIctory
that referenced
this pull request
Nov 24, 2026
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.
A filter that tracing-subscriber rejects, for example
VICTORY_LOG=victory_loader=loud, was dropped silently and the binary logged at its default level, so a typo looked like the target had nothing to log.logging::initnow prints one line on stderr naming the variable, its value and the parse error, then falls back to the default level as before:Picking the filter moves into
choose_filter, so it can be tested without changing the process environment. Precedence is unchanged (VICTORY_LOG, then RUST_LOG, then the default).Tests (Linux):
cargo test -p victory-core: 13 passed, including 5 new tests (unset, VICTORY_LOG over RUST_LOG, RUST_LOG fallback, a bad value in each variable)cargo clippy -p victory-core --all-targets -- -D warnings, with and without--features diagnostics: cleancargo fmt --check: clean