Skip to main content

Module logging

Module logging 

Source
Expand description

Configure tracing subscribers for Arti

Modulesยง

fields ๐Ÿ”’
Field formatters for tracing_subscriber.
otlp_file_exporter ๐Ÿ”’
Tracing exporter to write spans to a file in the OTLP JSON format.
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
A builder to create an instance of LogfileConfig.
LogfileListBuilder
Builder for the Vec<LogfileConfig> type.
LoggingConfig
Structure to hold our logging configuration options
LoggingConfigBuilder
A builder to create an instance of LoggingConfig.
OpentelemetryBatchConfig
Configuration for the Opentelemetry batch exporting.
OpentelemetryBatchConfigBuilder
A builder to create an instance of OpentelemetryBatchConfig.
OpentelemetryConfig
Configuration for exporting spans with OpenTelemetry.
OpentelemetryConfigBuilder
A builder to create an instance of OpentelemetryConfig.
OpentelemetryFileExporterConfig
Configuration for the OpenTelemetry HTTP exporter.
OpentelemetryFileExporterConfigBuilder
A builder to create an instance of OpentelemetryFileExporterConfig.
OpentelemetryHttpExporterConfig
Configuration for the OpenTelemetry HTTP exporter.
OpentelemetryHttpExporterConfigBuilder
A builder to create an instance of OpentelemetryHttpExporterConfig.
TokioConsoleConfig
Configuration for logging to the tokio console.
TokioConsoleConfigBuilder
A builder to create an instance of TokioConsoleConfig.

Enumsยง

LogRotation
How often to rotate a log file

Functionsยง

console_layer ๐Ÿ”’
Try to construct a tracing Layer for logging to stderr.
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 ๐Ÿ”’
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.
otel_layer ๐Ÿ”’
Try to construct a tracing Layer for exporting spans via OpenTelemetry.
setup_logging
Set up logging.
syslog_layer ๐Ÿ”’
Try to construct a tracing Layer for logging to syslog, if one is configured.