diff --git a/app.py b/app.py index 8bffe56..fbea29e 100644 --- a/app.py +++ b/app.py @@ -33,7 +33,7 @@ from bgfilter.service import SEG_MODELS, PipelineManager # Per-request correlation id. A middleware sets it; a logging filter injects it into # every record so all logs for one request share the id. contextvars (not thread- # locals) so a pooled worker thread never inherits the previous request's id. -LOG_FORMAT = os.environ.get("BGFILTER_LOG_FORMAT", "text").strip().lower() +LOG_FORMAT = os.environ.get("BGFILTER_LOG_FORMAT", "json").strip().lower() _request_id_var: contextvars.ContextVar[str] = contextvars.ContextVar("request_id", default="-") _RID_RE = re.compile(r"^[A-Za-z0-9._-]{1,64}$")