Skip to main content

Module logs

Module logs 

Source

Structs§

CompatLogger
InnerLogger
LogDirective
LogLineCachedState
Logger
Metadata
Metadata about a log message.
Rfc3339Time

Enums§

AccessLogFormat
LogLevel
LogLevelFilter
LogSpecParseError
LoggerBackend

Constants§

LOGGER

Statics§

COMPAT_LOGGER

Functions§

ansi_palette
ANSI palette used by every log_context! / log_*_context! macro in the proxy stack. Returns a 5-tuple (open, reset, grey, gray, white) where:
is_logger_colored
Returns true when the thread-local Logger is configured to emit colored output. Safe to call from inside an error!/info!/… argument list — the flag mirrors Logger::is_colored (i.e. InnerLogger::colored) into a dedicated Cell at Logger::init time so we never re-borrow the main logger cell (which is already held mutably while the outer log macro is formatting its arguments). The mirror is the single source of truth for hot-path callers; Logger::is_colored is the single source of truth for the rest of the API. They go through the same InnerLogger::colored field, so they cannot diverge by construction.
now
yields (Rfc3339Time, unix_epoch)
parse_logging_spec
setup_default_logging
start the logger with all logs and access logs on stdout
setup_logging
start the logger, after:
setup_logging_with_config
start the logger from config (takes RUST_LOG into account)
target_to_backend