Function log::set_max_level_racy
source · pub unsafe fn set_max_level_racy(level: LevelFilter)
Expand description
A thread-unsafe version of set_max_level
.
This function is available on all platforms, even those that do not have
support for atomics that is needed by set_max_level
.
In almost all cases, set_max_level
should be preferred.
Safety
This function is only safe to call when no other level setting function is called while this function still executes.
This can be upheld by (for example) making sure that there are no other threads, and (on embedded) that interrupts are disabled.
Is is safe to use all other logging functions while this function runs (including all logging macros).