[MPlayer-dev-eng] A question on message format rules

Reimar Döffinger Reimar.Doeffinger at gmx.de
Tue Feb 22 18:55:39 CET 2011


On Tue, Feb 22, 2011 at 10:29:14AM +0100, Ingo Brückl wrote:
> Reimar Döffinger wrote on Mon, 21 Feb 2011 19:15:17 +0100:
> 
> > On Sun, Feb 20, 2011 at 12:37:34AM +0100, Ingo Brückl wrote:
> >> Is there a favored format on the messages? I see:
> >>
> >> message only
> >> [some module] message
> >> [SOME MODULE] message
> 
> > Well, in principle only the message, and the module should correspond
> > to MSGT, and printing that can be globally enabled.
> > Sometimes (e.g. with vos where we have many different ones) it makes
> > sense to add that kind of thing though anyway.
> 
> I'm not sure that I totally got your point.
> 
> In particular, I'm asking myself whether general messages (mp_msg) should
> have the "[]" part (and I take your answer as "no").

In principle yes.

> For example, there are error messages
> 
>   "[skin] file ( %s ) not readable.\n"
>   "[ws] Could not open the display.\n"
> 
> and other ones (in, or belonging to, the same file) say
> 
>   "skin config file read error (%s)\n"
>   "Could not enable DPMS.\n"
> 
> I tend to remove the "[]" from mp_msg output strings and only leave them on
> mp_dbg output strings (to allow proper tracking).

I guess nobody really cares about mp_dbg (also since in most cases
it makes more sense to use mp_msg with appropriate MSGL_).
As to those specific examples, for the first message removing the
[] would make it harder to understand, so it should at least be rewritten.
For the second one, almost nobody is going to understand what '[ws]' is
supposed to mean, so it's rather useless to have it.


More information about the MPlayer-dev-eng mailing list