Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign up[env_logger] Adds a newline to format string before writing #219
Conversation
This comment has been minimized.
This comment has been minimized.
|
Stdout is line buffered - when will this change behavior? |
This comment has been minimized.
This comment has been minimized.
Is it? I observe broken logs every time I start two processes. Logs are written to stderr by default, though. Is there any difference between stdout and stderr? |
This comment has been minimized.
This comment has been minimized.
|
Well, it looks like undocumented, but yes, stdout is line buffered whereas stderr isn't. So we could revert to the old behavior on stdout. |
tailhook
force-pushed the
tailhook:atomic_newline
branch
from
6db2230
to
2094be4
Aug 15, 2017
This comment has been minimized.
This comment has been minimized.
|
Done. Also fixed bug. (I used to think that it's enough to run tests in root directory rather than |
This comment has been minimized.
This comment has been minimized.
|
Thanks for this @tailhook! Do you mind rebasing this over at https://github.com/sebasmagri/env_logger, which is the new home for |
KodrAus
referenced this pull request
Sep 17, 2017
Closed
Remove env_logger from this repository #145
This comment has been minimized.
This comment has been minimized.
|
Well, it's not so useful after: sebasmagri/env_logger#19 I'm not sure what to do:
|
tailhook
referenced this pull request
Sep 18, 2017
Merged
Avoid allocation of String during formatting. #19
This comment has been minimized.
This comment has been minimized.
|
We've started discussing this over in sebasmagri/env_logger#22 so I'll close this PR now. I'd definitely like to come up with a good solution to this before a |
tailhook commentedAug 14, 2017
This is important so in unix systems most of the time buffer is output
atomically (until certain length of message). Which means you don't get
two lines squashed together if they are written simultaneously.
I believe most of the time it's doesn't influence performance, because
underlying buffer of string is probably overallocated a bit anyway.