Expand description
Structured logging with trace correlation.
This module provides enterprise-grade logging infrastructure with:
- Automatic trace ID and span ID injection
- JSON structured output for log aggregation
- Log level filtering by module
- Integration with the
tracingcrate
§Example
ⓘ
use ringkernel_core::logging::{LogConfig, StructuredLogger, LogOutput};
let config = LogConfig::builder()
.level(LogLevel::Info)
.output(LogOutput::Json)
.with_trace_correlation(true)
.build();
let logger = StructuredLogger::new(config);
logger.info("Kernel started", &[("kernel_id", "k1"), ("mode", "persistent")]);Structs§
- Console
Sink - Console log sink.
- File
LogSink - File log sink.
- LogConfig
- Configuration for structured logging.
- LogConfig
Builder - Builder for log configuration.
- LogEntry
- A structured log entry.
- LogSink
Error - Log sink error.
- Logger
Stats - Logger statistics.
- Memory
LogSink - Memory log sink for testing.
- Structured
Logger - Structured logger with trace correlation.
- Trace
Context - Thread-local trace context for correlation.
Enums§
Traits§
- LogSink
- Trait for log output destinations.