Skip to main content

Module debug

Module debug 

Source

Enums§

DebugLevel
Debug level configuration for custom debug macros

Statics§

TRY_LOCK_FAILURE_COUNT
Total number of try_lock() calls that returned Err (lock contended) across all call sites in the application. Incremented via record_try_lock_failure.

Functions§

init_log_bridge
Initialize the log crate bridge. Call this once from main() instead of env_logger::init(). Routes all log::info!() etc. calls to the par-term debug log file. When RUST_LOG is set, also mirrors to stderr for terminal debugging.
is_enabled
Check if debugging is enabled at given level (for custom debug macros)
log
Log a message at specified level (for custom debug macros)
log_path
Get the path to the debug log file.
logf
Log formatted message (for custom debug macros)
maybe_log_try_lock_telemetry
Emit a periodic telemetry summary if new try_lock() failures have been recorded since the last call.
record_try_lock_failure
Record one try_lock() failure.
set_log_level
Update the log level at runtime (e.g., from settings UI). This only changes log::max_level() — the bridge itself always writes whatever passes the filter.
try_lock_failure_count
Return the current lifetime total of try_lock() failures.
try_logf
Write one line to the debug log without ever blocking. Returns whether it was written.