Skip to content

Commit

Permalink
fix: set default log level to debug
Browse files Browse the repository at this point in the history
  • Loading branch information
hougesen committed Jan 23, 2025
1 parent f5b5c50 commit b60d2f8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion mdsf/src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,10 @@ impl From<VerifyCommandArguments> for FormatCommandArguments {
}
}

#[derive(clap::ValueEnum, Clone, Copy, PartialEq, Eq, Debug)]
#[derive(clap::ValueEnum, Clone, Copy, PartialEq, Eq, Debug, Default)]
pub enum LogLevel {
Trace,
#[default]
Debug,
Info,
Warn,
Expand Down
4 changes: 2 additions & 2 deletions mdsf/src/commands/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@ mod prune_cache;
pub fn execute_command() -> Result<(), MdsfError> {
match Cli::parse().command {
Commands::Format(args) => {
setup_logger(args.log_level.unwrap_or(LogLevel::Debug));
setup_logger(args.log_level.unwrap_or(LogLevel::default()));

format::run(args, false)
}

Commands::Verify(args) => {
setup_logger(args.log_level.unwrap_or(LogLevel::Error));
setup_logger(args.log_level.unwrap_or(LogLevel::default()));

format::run(FormatCommandArguments::from(args), true)
}
Expand Down

0 comments on commit b60d2f8

Please sign in to comment.