Skip to main content

init

Function init 

Source
pub fn init(config: &LoggingConfig)
Expand description

Initializes the global tracing subscriber with structured logging.

Reads RUST_LOG for filter directives; falls back to INFO-level logging with TRACE-level for internal objectstore crates. Log format (pretty, simplified, or json) is determined by config.format, defaulting to pretty when a terminal is attached.

When built with the sentry feature, also attaches Sentry tracing layers if the Sentry client has been initialized:

  • ERROR..DEBUG spans become Sentry spans.
  • TRACE spans are ignored.
  • ERROR..DEBUG events become Sentry logs.
  • ERROR and WARN events also become Sentry error events.
  • TRACE events are ignored.
  • Logs and error events include the attributes of their parent spans.