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 <mj@k7zvx.com>
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
malice 2026-05-26 22:02:13 -06:00 committed by GitHub
commit bcb0fd02d1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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