feat(backend): daily request-tagged log files + print job lifecycle logging
Platform v2 step 0.4 (APPS_PLATFORM §10). New core/logging.py: - root logger -> stderr + <db dir>/logs/xenia-YYYY-MM-DD.log (UTC date, /app/data/logs in Docker, $LOG_DIR overrides); files older than the system.log_retention_days setting (default 30) are pruned - line format: UTC ISO time, level, logger, [req= user= device=], message - RequestContextMiddleware (pure ASGI): request id per request, X-Request-ID response header, one http line per request (DEBUG for plain reads) - auth tags the user via set_log_context; uvicorn loggers routed through ours Print jobs now log created / attempt / success / failed / abandoned with the job id, so a missing ticket can be traced. Removed cloud_sync's basicConfig. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -26,7 +26,6 @@ from services.license import evaluate, parse_dt, verify_token
|
||||
|
||||
ORDER_POLL_INTERVAL = settings.CONNECT_SYNC_INTERVAL_SECONDS
|
||||
|
||||
logging.basicConfig(level=logging.INFO)
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
SYNC_INTERVAL_SECONDS = 5 * 60 # 5 minutes
|
||||
|
||||
Reference in New Issue
Block a user