Skip to content

Simplify logging: drop indicatif, use set-once global verbosity#3

Merged
OzzyCzech merged 1 commit into
mainfrom
simplify-logging
Jun 17, 2026
Merged

Simplify logging: drop indicatif, use set-once global verbosity#3
OzzyCzech merged 1 commit into
mainfrom
simplify-logging

Conversation

@OzzyCzech

Copy link
Copy Markdown
Owner

Resolves #2.

Changes

  1. Drop unused indicatif — removed from Cargo.toml; Cargo.lock regenerated (70 lines gone).
  2. Set-once global verbosity — new src/log.rs holds an AtomicU8 set once in main and read by log(level, msg). The verbosity parameter is removed from deploy_mutations, execute_uploads, and auto_init.

Invariants preserved

  • stderr/stdout split (status logs → stderr, dry-run plan → stdout).
  • Quiet suppresses status logs; errors still propagate via Result.
  • Atomic read is safe for concurrent upload workers.
  • No password logging.

cargo build / clippy --all-targets / test (23 passed) all green.

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
@OzzyCzech OzzyCzech merged commit 71fdc62 into main Jun 17, 2026
4 checks passed
@OzzyCzech OzzyCzech deleted the simplify-logging branch June 17, 2026 07:06
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

Successfully merging this pull request may close these issues.

Simplify logging: drop unused indicatif, replace threaded verbosity with a set-once global

1 participant