Skip to main content

set_log_level

Function set_log_level 

Source
pub fn set_log_level(spelling: &str) -> LevelFilter
Expand description

Explicitly set the active log verbosity from a level spelling (off|error|warn|info|debug|trace, case-insensitive). This is the supported way to raise verbosity above the default — callers pass the level they want rather than relying on a process-global env var (std::env::var is banned crate-wide; see [resolve_log_level]). Returns the LevelFilter actually installed (the default when spelling is unrecognized, so a typo never silently disables logging). A no-op-safe wrapper over log::set_max_level.