[Patch] increase dbus_verbose readability

Ralf Habacker ralf.habacker at freenet.de
Thu Dec 17 00:55:04 PST 2009


Hi,

_dbus_verbose is currently the prefered way to print debug information. 
With the recent implementation it is sometime hard to determine the 
exact source location. There is still the way to add the function name 
manually, but this need additional manual efforts to keep the name in 
sync with reality.

Modern compilers have build in support for determine source code 
location like file name, line number and function names, which could be 
used to reduce the required effort in this area.

The appended patch extends dbus_verbose by adding filename, line number 
and function name to the output line like shown below

old:
5616: Loaded value 256 for limit max_names_per_connection
5616: Skipping non-.conf file basic.d

new:
5616: bus\config-parser.c(2564):bus_config_parser_content Loaded value 
256 for limit max_names_per_connection
5616: bus\config-parser.c(3116):all_are_equiv Skipping non-.conf file 
basic.d

      bus\config-parser.c                       - filename
                         (3116)                 - line number
                                all_are_equiv   - function name


Are there any helpfull suggestions for this feature ?

Regards
 Ralf



-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: dbus-verbose-with-additional-informations.patch
Url: http://lists.freedesktop.org/archives/dbus/attachments/20091217/eb431c5c/attachment.asc 


More information about the dbus mailing list