Debug messages and xf86DrvMsgVerb.

Luc Verhaegen libv at skynet.be
Tue Feb 1 18:40:05 PST 2005


For drivers, providing a macro for debugging, often wrapping around 
xf86DrvMsg, apparently is not a preferable solution, as it requires 
people to alter a define somewhere and recompile in order to get a more 
verbose log. Daniel suggested xf86DrvMsgVerb with a high verbosity as 
this would enable people to use -logverbose at runtime.

I'm having a hard time tracking down precedents for this, as most 
drivers currently use a selfdefined DEBUG() macro (or some variation).

Verbosity levels for xf86MsgVerb and xf86DrvMsgVerb are not formalised;
anywhere from 0 to 6 is used. The default verbosity level seems to be 3. 
Adam said that syslog levels are pretty much mirrored. As LOG_DEBUG is 
currently 7 here, xf86DrvMsg(scrnIndex, X_INFO, 7, ... seems a good 
solution. Maybe parallel LOG_ macros should be defined?

Another option would be to add X_DEBUG to MessageTypes and to have a 
high value for logverbose include these messages, which probably 
makes this the most invasive possibility.

Luc Verhaegen.



More information about the xorg mailing list