[vlc-devel] [PATCH] logger: flush log stream

Rémi Denis-Courmont remi at remlab.net
Tue Nov 14 09:47:59 CET 2017


Le 14 novembre 2017 09:51:13 GMT+02:00, Thomas Guillem <thomas at gllm.fr> a écrit :
>This fixes late logs on Windows.
>---
> modules/logger/console.c | 1 +
> 1 file changed, 1 insertion(+)
>
>diff --git a/modules/logger/console.c b/modules/logger/console.c
>index 14627479c9..e9c91bf631 100644
>--- a/modules/logger/console.c
>+++ b/modules/logger/console.c
>@@ -83,6 +83,7 @@ static void LogConsoleGray(void *opaque, int type,
>const vlc_log_t *meta,
>     vfprintf(stream, format, ap);
>     putc_unlocked('\n', stream);
>     funlockfile(stream);
>+    fflush(stream);
> }
> 
> static vlc_log_cb Open(vlc_object_t *obj, void **sysp)
>-- 
>2.11.0
>
>_______________________________________________
>vlc-devel mailing list
>To unsubscribe or modify your subscription options:
>https://mailman.videolan.org/listinfo/vlc-devel

This is completely useless since logs are line-buffered currently, and a newline is written two lines up. All this does is slow things down.
-- 
Envoyé de mon appareil Android avec Courriel K-9 Mail. Veuillez excuser ma brièveté.


More information about the vlc-devel mailing list