Skip to main content

log

Function log 

Source
pub fn log(level: Level, tag: &str, msg: &str)
Expand description

Log a record with the given level, tag, and msg.

This is the only entry point for structured logging. The first call transparently initialises the log directory and file sink.

§Per-sink level filtering

LevelConsole (default)File (default)
Debug✗✗
Info✗✓
Warn✓✓
Error✓✓

Override with SCRIBE_CONSOLE_LEVEL / SCRIBE_FILE_LEVEL. If time cannot be read or represented, write the original message and the error directly to stderr even for file-only levels, skipping the JSON sink.

浙ICP备2023005800号-2 浙公网安备33010902005384号