Skip to content

Commit

Permalink
Use log level from env var, use info as default
Browse files Browse the repository at this point in the history
  • Loading branch information
pool2win committed Nov 21, 2024
1 parent 3e589e5 commit b01c70c
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions justfile
Original file line number Diff line number Diff line change
@@ -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=<<level>> 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

0 comments on commit b01c70c

Please sign in to comment.