Processors
π€ AI-Generated Content
This documentation was generated with AI assistance and is still being audited. Some, or potentially a lot, of this information may be inaccurate. Learn more.
provide.foundation.logger.setup.processors
¶
Classes¶
Functions¶
apply_structlog_configuration
¶
apply_structlog_configuration(
processors: list[Any],
log_stream: TextIO,
effective_level: int = 20,
) -> None
Apply the processor configuration to structlog.
Uses structlog.make_filtering_bound_logger so that methods below
effective_level are literal return None β zero overhead, no
processor entry, no f-string evaluation needed.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
processors
|
list[Any]
|
List of processors to configure |
required |
log_stream
|
TextIO
|
Output stream for logging |
required |
effective_level
|
int
|
Numeric log level threshold (default 20 / INFO) |
20
|
Source code in provide/foundation/logger/setup/processors.py
build_complete_processor_chain
¶
Build the complete processor chain for structlog.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
config
|
TelemetryConfig
|
Telemetry configuration |
required |
log_stream
|
TextIO
|
Output stream for logging |
required |
Returns:
| Type | Description |
|---|---|
list[Any]
|
List of processors for structlog |
Source code in provide/foundation/logger/setup/processors.py
configure_structlog_output
¶
Configure structlog with the complete output chain.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
config
|
TelemetryConfig
|
Telemetry configuration |
required |
log_stream
|
TextIO
|
Output stream for logging |
required |
Source code in provide/foundation/logger/setup/processors.py
handle_globally_disabled_setup
¶
Configure structlog for globally disabled telemetry (no-op mode).
Uses a null logger factory that drops all output. The processor chain must still strip Foundation-specific context to avoid errors.