Add per-module log level overrides for staging/production
Support LOG_LEVEL_{MODULE} env vars (GAME, AI, HANDLERS, ROOM, AUTH,
STORES) to override the global log level for specific modules. Active
overrides are logged at startup. Includes staging/production presets
in .env.example files and a V3.18 stub doc for PostgreSQL storage
efficiency investigation.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
18
.env.example
18
.env.example
@@ -20,6 +20,24 @@ DEBUG=false
|
||||
# Logging level: DEBUG, INFO, WARNING, ERROR, CRITICAL
|
||||
LOG_LEVEL=INFO
|
||||
|
||||
# Per-module log level overrides (optional)
|
||||
# These override LOG_LEVEL for specific modules.
|
||||
# LOG_LEVEL_GAME=DEBUG # Core game logic
|
||||
# LOG_LEVEL_AI=DEBUG # AI decisions (very verbose at DEBUG)
|
||||
# LOG_LEVEL_HANDLERS=DEBUG # WebSocket message handlers
|
||||
# LOG_LEVEL_ROOM=DEBUG # Room/lobby management
|
||||
# LOG_LEVEL_AUTH=DEBUG # Auth stack (auth, routers.auth, services.auth_service)
|
||||
# LOG_LEVEL_STORES=DEBUG # Database/Redis operations
|
||||
|
||||
# --- Preset examples ---
|
||||
# Staging (debug game logic, quiet everything else):
|
||||
# LOG_LEVEL=INFO
|
||||
# LOG_LEVEL_GAME=DEBUG
|
||||
# LOG_LEVEL_AI=DEBUG
|
||||
#
|
||||
# Production (minimal logging):
|
||||
# LOG_LEVEL=WARNING
|
||||
|
||||
# Environment name (development, staging, production)
|
||||
ENVIRONMENT=development
|
||||
|
||||
|
||||
Reference in New Issue
Block a user