-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(cmd): add verbosity flag for logging
This commit adds a new feature to the `cmd` module. It introduces a new `verbosity` flag for logging, which allows the user to control the level of log output. The `verbosity` flag is implemented using the `clap_verbosity_flag` crate. The `verbosity` flag is defined as a `Verbosity<InfoLevel>` field in the `Cmd` struct. It is then used to initialize the logging level in the `run` method of the `Cmd` trait. The logging level is determined based on the value of the `verbosity` flag, and the corresponding `tracing::Level` is set for the logging framework. If the logging level is less than `DEBUG`, the logging configuration is set to exclude file names, line numbers, targets, and timestamps. Otherwise, the logging configuration includes all these details. The logging level is then used to initialize the logging framework. This change allows users to control the verbosity of log output, making it easier to debug and troubleshoot issues.
- Loading branch information
Showing
10 changed files
with
228 additions
and
167 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.