Rust env_logger variable
Self note post.
The env_logger crate in Rust which provides the underlying logging
facilities for the log crate requires an environment variable to be
set which configures the log levels (and subsequently which logs to
show in the console) - RUST_LOG.
Log levels
- error
- warn
- info
- debug
- trace
Commands for various shells
- Powershell
$Env:RUST_LOG="debug" - CMD
set RUST_LOG=debug - Bash/ZSH - Linux/Mac
export RUST_LOG="debug"
PS. I’m liking how simple the logging facility is with the
env_logger and log crates!