Expand description
Logging utilities for Foxy.
This module provides centralized logging configuration and helper functions for consistent logging throughout the application.
Two logging systems are supported:
- Traditional logging via env_logger (default)
- Structured logging via slog with JSON output support
Modules§
- config
- Configuration for logging.
- middleware
- HTTP middleware for request/response logging with trace context.
- structured
- Structured logging implementation for Foxy.
- test_
logger - wrapper
- Logging wrapper macros that route all messages to the standard
log
facade. Theslog_stdlog
bridge (configured instructured.rs
) handles forwarding toslog
when structured logging is enabled. This unified approach is simpler and more robust.
Functions§
- init_
with_ config - Initialize logging with the specified level and configuration.
- is_
structured_ logging - Check if structured logging is enabled
- log_
debug - Log a debug message with context.
- log_
error - Log an error with context and return the error.
- log_
info - Log an info message with context.
- log_
trace - Log a trace message with context.
- log_
warning - Log a warning with context.
- log_
with_ context - Log a message with additional context fields