Add Dalidou storage foundation and deployment prep

This commit is contained in:
2026-04-05 18:33:52 -04:00
parent b0889b3925
commit 6bfa1fcc37
19 changed files with 679 additions and 8 deletions

View File

@@ -16,15 +16,18 @@ _LOG_LEVELS = {
def setup_logging() -> None:
"""Configure structlog with JSON output."""
log_level = "DEBUG" if _config.settings.debug else "INFO"
renderer = (
structlog.dev.ConsoleRenderer()
if _config.settings.debug
else structlog.processors.JSONRenderer()
)
structlog.configure(
processors=[
structlog.contextvars.merge_contextvars,
structlog.processors.add_log_level,
structlog.processors.TimeStamper(fmt="iso"),
structlog.dev.ConsoleRenderer()
if settings.debug
else structlog.processors.JSONRenderer(),
renderer,
],
wrapper_class=structlog.make_filtering_bound_logger(
_LOG_LEVELS.get(log_level, logging.INFO)