From bcb0fd02d1432bb0361e09e7b183162aac91d3ab Mon Sep 17 00:00:00 2001 From: malice Date: Tue, 26 May 2026 22:02:13 -0600 Subject: [PATCH] navi-offroute: enable INFO logging for per-stage timing (#35) PR #34 added per-stage Auto timing logs (single-mode probing took..., hybrid candidate gathering..., hybrid probing took...) at logger.info level, but navi-offroute has no logging config, so Python's last-resort handler dropped everything below WARNING and the lines never reached stderr/journal. This one-line logging.basicConfig(level=logging.INFO) in app.py opens the gate so those lines surface in journald, letting us localize the 6-7s baseline Auto latency on in-town routes. No other changes. Co-authored-by: Matt Co-authored-by: Claude Opus 4.7 (1M context) --- backend/services/navi_offroute/app.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/backend/services/navi_offroute/app.py b/backend/services/navi_offroute/app.py index 595b7bc..c095814 100644 --- a/backend/services/navi_offroute/app.py +++ b/backend/services/navi_offroute/app.py @@ -3,6 +3,7 @@ Gunicorn entry: gunicorn 'services.navi_offroute.app:create_app()' --bind 127.0.0.1:8428 --workers 2 """ +import logging import time from flask import Flask @@ -14,6 +15,11 @@ from .mvum import MVUMSpatialIndex from .mvum_transitions import load_trailheads from .mvum_parking import load_parking_index +# Emit INFO+ so PR #34 per-stage Auto timing logs (single-mode probing took..., +# hybrid candidate gathering..., hybrid probing took...) reach stderr/journal; +# navi-offroute had no logging config, so the last-resort handler dropped INFO. +logging.basicConfig(level=logging.INFO) + # Process-wide singleton: build the MVUM spatial index once per process (per gunicorn # worker in prod; once across create_app() calls in tests), not once per app instance. _MVUM_INDEX = None