LogInit: make stderr line-buffered

Make sure everything gets logged right away.  No delays because
stdio's buffer is not yet full.
This commit is contained in:
Max Kellermann 2014-12-17 18:05:44 +01:00
parent 81f17d10c8
commit 90709b332a

View File

@ -111,6 +111,9 @@ log_early_init(bool verbose)
#ifdef ANDROID
(void)verbose;
#else
/* force stderr to be line-buffered */
setvbuf(stderr, nullptr, _IOLBF, 0);
if (verbose)
SetLogThreshold(LogLevel::DEBUG);
#endif