Slog itself recommends using tracing, so let's use tracing.
Also: slog env_looger is a bit derpy to set up with defaults that provide useful logging information for falcon CLI applications. In particular, the need to set the environment variable RUST_LOG with std::env::set_var is unsafe from multi-threaded code.
|
match std::env::var("RUST_LOG") { |
|
Ok(s) => { |
|
if s.is_empty() { |
|
std::env::set_var("RUST_LOG", "info"); |
|
} |
|
} |
|
_ => { |
|
std::env::set_var("RUST_LOG", "info"); |
|
} |
|
} |
Hopefully, we can find a better path forward with tracing for user-configurable log levels with a useful default.
Slog itself recommends using tracing, so let's use tracing.
Also: slog env_looger is a bit derpy to set up with defaults that provide useful logging information for falcon CLI applications. In particular, the need to set the environment variable
RUST_LOGwithstd::env::set_varis unsafe from multi-threaded code.falcon/lib/src/lib.rs
Lines 252 to 261 in 979dc84
Hopefully, we can find a better path forward with tracing for user-configurable log levels with a useful default.