dbus daemon - creating a logfile of all messages

Havoc Pennington hp at redhat.com
Thu May 11 08:28:01 PDT 2006

Kai Teuber wrote:
> Hi,
> I'm trying to monitor all messages on dbus, because the dbus-monitor didn't 
> makes it. So I tried to patch the daemon.
> Within the file dbus_connection.c in the function dbus_connection_dispatch I 
> added some code to write the needed informations into a logfile.
> But some needed informations are missing. I get the member name, the 
> destination name but not the sender name. It always is '(null)'.

That's because the sender is filled in by the daemon. So you would need 
to log it after it gets filled in sometime.

> Can someone tell me where a better place is to make a logfile from all 
> messages on the bus?

As Rob says it'd be nicer to just fix the allow_eavesdrop bug - try 
turning on verbose logging in the daemon and you'll get all kinds of 
logging with no effort ;-) and you can probably use that plus looking at 
the code to figure out this bug.


More information about the dbus mailing list