From b01c70c1430a94b667d76ce94d84d5d6bfd52b11 Mon Sep 17 00:00:00 2001 From: pool2win Date: Thu, 21 Nov 2024 08:49:35 +0100 Subject: [PATCH] Use log level from env var, use info as default --- justfile | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/justfile b/justfile index b39d003..239aff5 100644 --- a/justfile +++ b/justfile @@ -1,13 +1,17 @@ +# Set default log level if not provided through environment +export LOG_LEVEL := env_var_or_default("RUST_LOG", "info") + default: test test: - RUST_LOG=debug cargo test + RUST_LOG={{LOG_LEVEL}} cargo test build: cargo build +# For log level use RUST_LOG=<> just run run config="config.toml": - RUST_LOG=debug cargo run -- --config-file={{config}} + RUST_LOG={{LOG_LEVEL}} cargo run -- --config-file={{config}} check: cargo check