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:
parent
81f17d10c8
commit
90709b332a
@ -111,6 +111,9 @@ log_early_init(bool verbose)
|
|||||||
#ifdef ANDROID
|
#ifdef ANDROID
|
||||||
(void)verbose;
|
(void)verbose;
|
||||||
#else
|
#else
|
||||||
|
/* force stderr to be line-buffered */
|
||||||
|
setvbuf(stderr, nullptr, _IOLBF, 0);
|
||||||
|
|
||||||
if (verbose)
|
if (verbose)
|
||||||
SetLogThreshold(LogLevel::DEBUG);
|
SetLogThreshold(LogLevel::DEBUG);
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user