Skip to main content

log_path

Function log_path 

Source
pub fn log_path() -> PathBuf
Expand description

Get the path to the debug log file.

The debug macros initialize the file logger through [get_logger] even at DEBUG_LEVEL=Off (is_enabled locks the logger before the level check), and the file is opened with truncate(true) — so in cfg(test) builds the path is pid-suffixed to keep the test binary from destroying the developer’s real debug log.