dbus daemon - creating a logfile of all messages

Kai Teuber Kai.Teuber at basyskom.de
Thu May 11 04:33:02 PDT 2006


Am Donnerstag 11 Mai 2006 12:30 schrieb Ralf Habacker:
> Kai Teuber schrieb:
> > 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)'.
> >
> > Can someone tell me where a better place is to make a logfile from all
> > messages on the bus?
>
> May be the appended dbus-monitor.c file may help you. I have patched it
> to get rid of glib requirements and it uses internal main loop, which
> works good for me.  Sender is shown if set.
>
> Regards
> Ralf

Thanks for the file, but it doesn't compile. Maybe something is missng?

//dbus-monitor.c:92: undefined reference to `_dbus_list_pop_first'
dbus-monitor.o(.text+0x8a)://dbus-monitor.c:95: undefined reference to 
`_dbus_loop_ref'
dbus-monitor.o(.text+0x161): In function `main':
//dbus-monitor.c:174: undefined reference to `_dbus_loop_new'
dbus-monitor.o(.text+0x191)://dbus-monitor.c:190: undefined reference to 
`_dbus_loop_queue_dispatch'
dbus-monitor.o(.text+0x3e9)://dbus-monitor.c:239: undefined reference to 
`_dbus_loop_unref'
dbus-monitor.o(.text+0x410): In function `_____dbus_loop_run':
//dbus-monitor.c:56: undefined reference to `_dbus_list_pop_first'
dbus-monitor.o(.text+0x41a)://dbus-monitor.c:59: undefined reference to 
`_dbus_loop_ref'
collect2: ld returned 1 exit status
make[3]: *** [dbus-monitor] Error 1
make[3]: *** Waiting for unfinished jobs....
make[3]: Leaving directory `/home/kai/Projekte/Telepathy/dbus/tools'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/home/kai/Projekte/Telepathy/dbus/tools'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/kai/Projekte/Telepathy/dbus'
make: *** [all] Error 2

Regards,
 Kai


More information about the dbus mailing list