Expand description
Code for turning safelogging on and off.
By default, safelogging is on. There are two ways to turn it off: Globally
(with disable_safe_logging) and locally (with
with_safe_logging_suppressed).
Re-exportsยง
use crate::Error;๐use crate::Result;๐use fluid_let::fluid_let;๐use std::sync::atomic::AtomicIsize;๐use std::sync::atomic::Ordering;๐
Structsยง
- Guard
- A guard object used to enforce safe logging, or turn it off.
Enumsยง
Staticsยง
- LOGGING_
STATE ๐ - A global atomic used to track locking guards for enabling and disabling safe-logging.
- SAFE_
LOGGING_ ๐SUPPRESSED_ IN_ THREAD - A dynamic variable used to temporarily disable safe-logging.
Functionsยง
- disable_
safe_ logging - Create a new
Guardto disable safe logging. - enforce_
safe_ logging - Create a new
Guardto prevent anyone else from disabling safe logging. - with_
safe_ logging_ suppressed - Run a given function with the regular
safelogfunctionality suppressed.