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

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


Le 14 novembre 2017 10:56:41 GMT+02:00, Thomas Guillem <thomas at gllm.fr> a écrit :
>
>
>On Tue, Nov 14, 2017, at 09:47, Rémi Denis-Courmont wrote:
>> 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.
>
>This seems required in Windows. Maybe with a #ifdef _WIN32 ?
>
>> -- 
>> Envoyé de mon appareil Android avec Courriel K-9 Mail. Veuillez
>excuser
>> ma brièveté.
>> _______________________________________________
>> vlc-devel mailing list
>> To unsubscribe or modify your subscription options:
>> https://mailman.videolan.org/listinfo/vlc-devel
>_______________________________________________
>vlc-devel mailing list
>To unsubscribe or modify your subscription options:
>https://mailman.videolan.org/listinfo/vlc-devel

Do you really want to slow the system down that badly?

STDIO buffering is specified in ISO C. It is not OS-dependent.
-- 
Envoyé de mon appareil Android avec Courriel K-9 Mail. Veuillez excuser ma brièveté.


More information about the vlc-devel mailing list