[vlc-devel] [PATCH] config: cmdline: Use msg_* instead of fprintf

Filip Roséen filip at atch.se
Tue Aug 2 19:18:18 CEST 2016

Hi Hugo,

On 16/08/02 19:05, Hugo Beauzée-Luyssen wrote:

> Sorry for the lack of comment... basically the idea is this change allows
> one to see the log on some platform that would swallow stdout/stderr,
> making debugging easier. It seems weird that this wasn't done before, yet
> I can't see a reason for it, hence the patch.

Given that `config_LoadCmdLine` is invoked prior to `vlc_LogInit`, using
`msg_*` for messages related to processing the command-line options would
currently lead to such messages not being displayed, through
`vlc_vaLogDiscard`,  if no *logger-module* is found usable.

`vlc_LogPreInit` enables log messages to be stored in memory until a
logger-module is available, meaning that diagnostics will not be displayed
until after `vlc_LogInit` is called (if ever).

In other words; if an invalid --logger option is supplied, or if loading of
the logger-module fails for some other reason, the diagnostic related to
parsing command-line options would be lost.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20160802/5e44b7a1/attachment.html>

More information about the vlc-devel mailing list