{"version":"2.1.246","anchor":"debug-log-lines-are-no-longer-lost-when-the-log-rotates","canonical_anchor":"debug-log-lines-are-no-longer-lost-when-the-log-rotates","heading":"Debug log lines are no longer lost when the log rotates","tier":"notice","area":"Internals","scope":null,"heads_up":null,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.246\/e\/debug-log-lines-are-no-longer-lost-when-the-log-rotates","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.246","markdown":"### Debug log lines are no longer lost when the log rotates\n\nDebug log lines written during a log rotation are kept rather than dropped.\n\n**What**\n\nThe rotating debug log used by runners and background sessions now buffers lines written while a rotation is under way and replays them into the new file, instead of dropping them.\n\n**Details**\n\n- Writes after the log is closed are ignored rather than erroring.\n- Closing waits for any rotation in flight before ending the stream, using a helper that returns immediately if the stream is already closed.\n\n**Evidence**\n\n`[runner:session] debug log flush failed (best-effort): `\n\n- Area: Internals\n- Tier: You'll notice\n- Useful: 2\/5\n- Signal: 1\/5"}