Logging
logging ¶
Default structlog configuration that defers to the host's logging setup.
gepa-adk logs through structlog and never prints. When a host program has not configured structlog, structlog's built-in default writes every event, DEBUG included, to stdout. This module replaces that default with a configuration that routes events through the standard library logging module, so the host's logging configuration decides what is emitted and where.
| ATTRIBUTE | DESCRIPTION |
|---|---|
configure_default_logging | Route structlog through the standard library when the host has not configured structlog. TYPE: |
Examples:
The package calls this at import time. A host that wants the DEBUG events configures logging before importing gepa-adk:
import logging
logging.basicConfig(level=logging.DEBUG)
import gepa_adk # registration events now appear at DEBUG
See Also
- structlog configuration:
structlog.is_configured()andstructlog.stdlib.LoggerFactory. EncodingSafeProcessor: Processor placed before the renderer in the default chain.
Notes
A structlog configuration made before gepa-adk is imported is left untouched. The package never calls logging.basicConfig and adds no handlers, so with no host configuration Python's last-resort handler emits WARNING and above to stderr and drops DEBUG and INFO.
configure_default_logging ¶
Route structlog through logging unless the host configured structlog.
| RETURNS | DESCRIPTION |
|---|---|
bool | True if this call configured structlog, False if structlog was already |
bool | configured and was left unchanged. |
Examples:
from gepa_adk.utils.logging import configure_default_logging
configure_default_logging() # False after gepa_adk has been imported