On Linux at least, logging to stderr redirected to a file by the shell, logs emitted by multiple threads can race so that one thread's message is printed between another thread's message and its newline. I guess the newline is printed with a separate syscall, but it shouldn't be.