Skip to content

Commit

Permalink
Set default log level to info on release build
Browse files Browse the repository at this point in the history
  • Loading branch information
N3xed committed Aug 5, 2023
1 parent 305757e commit 45dba38
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,16 @@ fn check_cfg_exists(p: PathBuf) -> Result<PathBuf> {
#[tokio::main(flavor = "current_thread")]
async fn main() -> anyhow::Result<()> {
let args = Args::parse();
simple_logger::init_with_env()?;
simple_logger::SimpleLogger::new()
.with_level(
#[cfg(debug_assertions)]
log::LevelFilter::Debug,
#[cfg(not(debug_assertions))]
log::LevelFilter::Info,
)
.env()
.init()
.unwrap();

// Figure out the config path to use.
let config_path = match args.config {
Expand Down

0 comments on commit 45dba38

Please sign in to comment.