{"version":"2.1.227","anchor":"debug-logging-rebuilt-around-a-single-logger-instance","canonical_anchor":"debug-logging-rebuilt-around-a-single-logger-instance","heading":"Debug logging rebuilt around a single logger instance","tier":"internal","area":"Debug Logging","scope":null,"heads_up":null,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.227\/e\/debug-logging-rebuilt-around-a-single-logger-instance","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.227","markdown":"### Debug logging rebuilt around a single logger instance\n\nDebug logging now runs through one logger that keeps queued lines when it restarts.\n\n**What**\n\nDebug log settings that were separate cached lookups (`CLAUDE_CODE_DEBUG_LOG_LEVEL`, `--debug=`, `--debug-to-stderr`, `--debug-file`, `CLAUDE_CODE_DEBUG_LOGS_DIR`) now live on one object. Lines are tagged with their session and grouped before flushing, and can be written through the storage layer when one is installed, falling back to plain rotated log files otherwise. A newly started logger takes over the previous one's queued lines instead of losing them.\n\n**Evidence**\n\n`CLAUDE_CODE_DEBUG_LOGS_DIR`\n\n- Area: Debug Logging\n- Names: `CLAUDE_CODE_DEBUG_LOG_LEVEL`, `--debug-to-stderr`, `--debug-file`, `CLAUDE_CODE_DEBUG_LOGS_DIR`\n- Tier: Under the hood\n- Useful: 3\/5\n- Signal: 2\/5"}