Simplify logging: drop indicatif, use set-once global verbosity#3
Merged
Conversation
Remove the unused `indicatif` dependency (declared but used nowhere). Replace the threaded `verbosity` parameter with a process-global atomic set once in `main` and read by `log()`. This drops the parameter from `deploy_mutations`, `execute_uploads`, and `auto_init` (and the now- unneeded too_many_arguments allow). Logging behavior is unchanged: stderr/stdout split, level filtering, and quiet suppression all preserved. Closes #2
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.
Resolves #2.
Changes
indicatif— removed fromCargo.toml;Cargo.lockregenerated (70 lines gone).src/log.rsholds anAtomicU8set once inmainand read bylog(level, msg). Theverbosityparameter is removed fromdeploy_mutations,execute_uploads, andauto_init.Invariants preserved
Result.cargo build/clippy --all-targets/test(23 passed) all green.