first commit

This commit is contained in:
2025-11-06 03:25:44 -06:00
commit 38a9fb2789
17 changed files with 1153 additions and 0 deletions

View File

@@ -0,0 +1,27 @@
from __future__ import annotations
import logging
import structlog
def _configure() -> None:
processors = [
structlog.processors.add_log_level,
structlog.processors.TimeStamper(fmt="iso", utc=False),
structlog.processors.StackInfoRenderer(),
structlog.processors.format_exc_info,
structlog.processors.JSONRenderer(sort_keys=True),
]
structlog.configure(
processors=processors,
wrapper_class=structlog.make_filtering_bound_logger(logging.INFO),
cache_logger_on_first_use=True,
)
_configure()
def get_logger() -> structlog.stdlib.BoundLogger:
return structlog.get_logger()