rsys

Basic data structures and low-level features
git clone git://git.meso-star.fr/rsys.git
Log | Files | Refs | README | LICENSE

commit 69588af1bd539112218193a151eecb929375a4ff
parent 856a974ab7499ddbf59ed4fdd35ebec9086139c1
Author: vaplv <vaplv@free.fr>
Date:   Fri,  7 Jan 2022 09:47:24 +0100

Flush the default logger stream once a message is printed

Diffstat:
Msrc/logger.c | 4+++-
1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/logger.c b/src/logger.c @@ -42,7 +42,9 @@ logger_vprint ASSERT(logger && log && (unsigned)type < LOG_TYPES_COUNT__); if(logger == LOGGER_DEFAULT) { - vfprintf(type == LOG_OUTPUT ? stdout : stderr, log, vargs_list); + FILE* stream = LOG_OUTPUT ? stdout : stderr; + vfprintf(stream, log, vargs_list); + fflush(stream); return RES_OK; }