set_max_level

Function set_max_level 

Source
pub fn set_max_level(filter: LevelFilter)
Expand description

Sets the runtime maximum log level.

If the given filter argument is greater than STATIC_MAX_LEVEL, then the runtime maximum log level is set to STATIC_MAX_LEVEL.

This function also updates the log crate’s max level so that third-party crates using log::info!() etc. are filtered consistently.

§Requirements

This function is intended to be called sequentially: concurrent calls to this function may cause the maximum levels kept by OSTD and log to diverge.