Skip to main content

setup_default

Function setup_default 

Source
pub fn setup_default() -> Result<(), LoggerError>
Expand description

Initialise the global logger with default settings.

Respects environment variables:

  • LOG_LEVEL or RUST_LOG: Log level
  • LOG_FORMAT: Output format (json, text, auto)
  • NO_COLOR: Disable coloured output
  • LOG_THROTTLE_ENABLED: Enable log deduplication (default: false)
  • LOG_THROTTLE_BURST: Token bucket burst capacity (default: 50)
  • LOG_THROTTLE_RATE: Token recovery rate per second (default: 1.0)

§Errors

Returns an error if the logger is already initialised.