Skip to main content

init

Function init 

Source
pub fn init(dir: Option<&Path>) -> Result<()>
Expand description

Initialize the global tracing subscriber with a colorized console layer.

If dir is Some, also writes daily log files to that directory: YYYY-MM-DD.txt for the combined log and YYYY-MM-DD_<level>.txt for each tracing level. The directory is created if it does not exist, and any *.txt file older than 7 days is pruned on startup.