rust-cli / rust-cli/env_logger
Dynamically change log level after `init`
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 1.1k
- Forks
- 149
- Avg merge
- 2h 42m
- Merged PRs (30d)
- 4
Description
Is there currently a way to change the log level after having called init already? If there is currently no way, i would like to request this feature
Use case:
i would like to enable logging as the first thing in my code to have log output (from env, etc) and later after having parsed the cli (like with clap) set the level based on something like verbosity.
also another use case would be to dynamically turn the logging on / off for a specific part (which is probably already covered by #144)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing the existing init API and how the environment-based log level is applied. Review the relationship to issue #144 and the stated CLI parsing use case. Done means the logger's level can be changed after initialization, including enabling or disabling logging for a later part of the program.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- observability
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100