diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index eeb49b8..d16eac8 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -32,6 +32,8 @@ jobs: run: cargo clippy - name: rust tests run: cargo test + - name: release build + run: cargo build --release js_tests: runs-on: ubuntu-latest diff --git a/src/main.rs b/src/main.rs index 8c3188a..13cd472 100644 --- a/src/main.rs +++ b/src/main.rs @@ -52,15 +52,20 @@ struct Args { } fn setup_logging(args: &Args) -> Result { - let log_level = if args.silent { + #[allow(unused_mut)] + let mut log_level = if args.silent { LevelFilter::Off - } else if args.trace { - LevelFilter::Trace } else if args.debug { LevelFilter::Debug } else { LevelFilter::Info }; + + #[cfg(debug_assertions)] + if args.trace { + log_level = LevelFilter::Trace; + } + TermLogger::init( log_level, LogConfig::default(),