Skip to main content

init_logging

Function init_logging 

Source
pub fn init_logging(context: &str) -> Option<WorkerGuard>
Expand description

Initialize the dual-layer logging system.

Returns a guard that must be kept alive for the file logger to flush on drop. The context string is embedded in log entries to identify the operation (e.g., “update”, “verify”, “bench”).

§File format

JSON lines with fields: timestamp, level, span, message, plus any structured fields from spans.

§Storage efficiency

Daily rotation with max 3 log files retained. Older files are pruned automatically by tracing-appender.