Skip to main content

Crate glide_logger

Crate glide_logger 

Source

Macros§

log_debug_lazy
log_debug_rate_limited
log_error_lazy
log_info_lazy
log_info_rate_limited
log_trace_lazy
Lazy logging macros that only evaluate the message expression if the log level is enabled. This avoids the cost of format!(...) when the level is disabled.
log_warn_lazy
log_warn_rate_limited
Rate-limited logging macro. Logs at most once per interval_secs seconds. Uses a static AtomicU64 per call site to track the last log time.

Structs§

InitiateOnce
Reloads

Enums§

Level

Statics§

CURRENT_MAX_VERBOSITY
Cheap, cached effective max log verbosity (0=Off,1=Error,2=Warn,3=Info,4=Debug,5=Trace). Read on every lazy-log macro invocation to short-circuit the (expensive, RwLock-guarded) reload-subscriber enabled check when the level is disabled — the common hot-path case (e.g. per-command trace/debug logs while running at the default Warn level). Updated by init whenever the effective level changes; set as an UPPER BOUND on the true effective level so it can never suppress a log that should be emitted.
INITIATE_ONCE

Functions§

create_directory_from_env
Attempt to read a directory path from an environment variable. If the environment variable envname exists and contains a valid path - this function will create and return that path. In any case of failure, this method returns None (e.g. the environment variable exists but contains an empty path etc)
init
level_may_be_enabled
Maps tracing::Level to the verbosity ordering used by CURRENT_MAX_VERBOSITY.
log
log_debug
log_error
log_info
log_trace
log_warn