github jmasarweh/UniFi-Insights-Plus v1.2.1
v1.2.1 — Configurable Logging Levels

latest releases: v3.7.0, v3.6.3, v3.6.2...
2 months ago

What's New

Configurable LOG_LEVEL Environment Variable

Docker log output is now tuneable via a single environment variable. Add LOG_LEVEL to your .env file to control verbosity across all Python processes and uvicorn.

Value Behavior
DEBUG Everything: periodic stats, backfill progress, all HTTP access logs
INFO Default. Startup, shutdown, config changes, backfill work summaries — no per-request noise
WARNING Quiet steady-state — only warnings and errors
ERROR Errors only

Uvicorn Access Log Filter

High-frequency polling endpoints (/api/health every 15s, /api/logs on page load) are now automatically suppressed from access logs at INFO level. They only appear at DEBUG. Other endpoints (setup, enrich, export, stats) remain visible at all levels.

Log Statement Audit

Reclassified noisy INFO messages to DEBUG:

  • Periodic DB/enrichment stats (every 15 min)
  • "Waiting for PostgreSQL..." retry loop
  • "Backfill: nothing to do" (every 30 min when idle)
  • Direction and service name backfill per-batch progress

All meaningful state changes remain at INFO: startup/shutdown, config loads, schema migrations, backfill work summaries, rate limit state changes, retention cleanup.

Usage

# In your .env file:
LOG_LEVEL=INFO    # DEBUG, INFO (default), WARNING, ERROR, CRITICAL

Set to WARNING to reduce Docker log noise in steady-state. Use DEBUG for troubleshooting.

Files Changed

  • receiver/main.py — LOG_LEVEL parsing + 3 logs demoted to DEBUG
  • receiver/api.py — LOG_LEVEL parsing + QuietAccessFilter for uvicorn access logs
  • receiver/backfill.py — 4 logs demoted to DEBUG
  • entrypoint.sh — Exports UVICORN_LOG_LEVEL for supervisord
  • supervisord.conf — Dynamic --log-level from env var
  • docker-compose.yml — LOG_LEVEL documentation
  • README.md — Added to env var table and .env example

Full Changelog: v1.2.0...v1.2.1

Don't miss a new UniFi-Insights-Plus release

NewReleases is sending notifications on new releases.