Fix stderr log writer
fixes: #1692 (closed)
We were missing an edge case where the log writer has written MaxStderrBytes - bytes. We weren't accounting for the escaped newline character "\n" in the conditional. This MR fixes it, and adds a test for that edge case.