[vlc-devel] [PATCH] config: cmdline: Use msg_* instead of fprintf
filip at atch.se
Tue Aug 2 19:18:18 CEST 2016
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...
More information about the vlc-devel