dispatcher: make verbose JSON logging optional via `VERBOSE_LOGGING` setting

Summary

Gate all info-level log_dict() calls behind a new VERBOSE_LOGGING dynaconf setting (default: true, preserving current behavior).

Problem

Under high load (1000+ requests in new state), the dispatcher logs the full JSON of every request on each tick via log_dict(). This produces megabytes of journal output per second — so much that systemd-journald was suppressing messages:

systemd-journald: Suppressed 184917 messages from tft-dispatcher.service

Changes

  • Added VERBOSE_LOGGING: true to settings.yaml (default preserves current behavior)
  • Gated all 6 info-level log_dict() calls behind settings.VERBOSE_LOGGING
  • When disabled, logs concise one-line summaries instead (e.g. requests in 'new' state: 861)
  • Error-level log_dict() calls left unconditional — always want full context on failures
  • Override via env var: TF_DISPATCHER_VERBOSE_LOGGING=false

Assisted-by: Claude Code

Edited by Miroslav Vadkerti

Merge request reports

Loading