Plainnotes

The cost of leaving debug logging on

2026-01-28 · 2 min readDebug

Debug logging was enabled to chase a bug and never turned off. A week later: an 80G log file and grep taking tens of seconds.

Volume is not the only cost. Synchronous logging blocks request threads, and on slow disks it drags QPS down — one service went from 40ms p99 to 900ms purely because of logging.

Habits worth keeping: set an expiry when raising the level, default to info in production, and use asynchronous appenders so request threads never wait on IO.

When the investigation ends, turn it back down first, then confirm the files actually shrink.