"""Gunicorn settings: one access line per request on stdout, for Pantheos. Docker's json-file driver captures stdout and Pantheos ingests it, so each line becomes a request log and feeds the container's rps / 5xx / p95. Monitoring traffic (/metrics scrapes, /health checks) is left out so it doesn't drown the real requests. """ from gunicorn import glogging accesslog = "-" access_log_format = '"%(r)s" %(s)s %(M)sms' _QUIET_PATHS = ("/metrics", "/health") class _Logger(glogging.Logger): def access(self, resp, req, environ, request_time): if req.path not in _QUIET_PATHS: super().access(resp, req, environ, request_time) logger_class = _Logger