Module logging

Source
Expand description

Configure tracing subscribers for Arti

Modules§

time 🔒
Support logging the time with different levels of precision.

Structs§

LogGuards
Opaque structure that gets dropped when the program is shutting down, after logs are no longer needed. The Drop impl flushes buffered messages.
LogfileConfig
Configuration information for an (optionally rotating) logfile.
LogfileConfigBuilder
Builder for LogfileConfig.
LogfileListConfigBuilder 🔒
Wrapper struct to help derive_builder find the right types and methods
LoggingConfig
Structure to hold our logging configuration options
LoggingConfigBuilder
Builder for LoggingConfig.

Enums§

LogRotation
How often to rotate a log file

Functions§

console_layer 🔒
Try to construct a tracing [Layer] for logging to stdout.
default_console_filter 🔒
Return a default tracing filter value for logging.console.
filt_from_opt_str 🔒
As filt_from_str_verbose, but treat an absent filter (or an empty string) as None.
filt_from_str_verbose 🔒
As [Targets::from_str], but wrapped in an anyhow::Result.
install_panic_handler 🔒
Configure a panic handler to send everything to tracing, in addition to our default panic behavior.
journald_layer 🔒 journald
Try to construct a tracing [Layer] for logging to journald, if one is configured.
logfile_layer 🔒
Try to construct a non-blocking tracing [Layer] for writing data to an optionally rotating logfile.
logfile_layers 🔒
Try to construct a tracing [Layer] for all of the configured logfiles.
setup_loggingexperimental-api
Set up logging.

Type Aliases§

LogfileListConfig 🔒
Local type alias, mostly helpful for derive_builder to DTRT