Skip to main content

init_structured_logging

Function init_structured_logging 

Source
pub fn init_structured_logging(
    config: &StructuredLoggingConfig,
    service_name: &str,
    environment: &str,
    log_level: &str,
) -> Result<LogBuffer, Error>
Expand description

Initialize structured logging with JSON output

§Arguments

  • config - Logging configuration
  • service_name - Name of the service for log labels
  • environment - Environment name (dev, staging, prod)
  • log_level - Log level (trace, debug, info, warn, error)

§Returns

Returns a log buffer handle for accessing aggregated logs