Skip to main content

Module flags

Module flags 

Source
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ยง

GuardKind ๐Ÿ”’
Enum to describe what kind of a Guard weโ€™ve created.

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 Guard to disable safe logging.
enforce_safe_logging
Create a new Guard to prevent anyone else from disabling safe logging.
with_safe_logging_suppressed
Run a given function with the regular safelog functionality suppressed.