[vlc-devel] [PATCH] config: cmdline: Use msg_* instead of fprintf
hugo at beauzee.fr
Tue Aug 2 19:22:48 CEST 2016
On 08/02/2016 07:18 PM, Filip Roséen wrote:
> 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).
Thanks for the explanation!
> 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.
Ok fair enough. I'd argue that it's still valuable if it isn't lost, but
I get the idea.
Feel free to drop the patch :)
More information about the vlc-devel