mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-02 07:23:41 +02:00
GDBus: Add `return' debug option
This prints all GDBusMethodInvocation API usage and is normally used with the `incoming' option. Example: # G_DBUS_DEBUG=incoming,return ./polkitd --replace Entering main event loop Connected to the system bus Registering null backend at priority -10 [...] Acquired the name org.freedesktop.PolicyKit1 [...] ======================================================================== GDBus-debug:Incoming: <<<< METHOD INVOCATION org.freedesktop.PolicyKit1.Authority.RegisterAuthenticationAgent() on object /org/freedesktop/PolicyKit1/Authority invoked by name :1.26 serial 299 ======================================================================== GDBus-debug:Return: >>>> METHOD ERROR org.freedesktop.PolicyKit1.Error.Failed message `Cannot determine session the caller is in' in response to org.freedesktop.PolicyKit1.Authority.RegisterAuthenticationAgent() on object /org/freedesktop/PolicyKit1/Authority to name :1.26 reply-serial 299 [...] ======================================================================== GDBus-debug:Incoming: <<<< METHOD INVOCATION org.freedesktop.PolicyKit1.Authority.RegisterAuthenticationAgent() on object /org/freedesktop/PolicyKit1/Authority invoked by name :1.2402 serial 25 ======================================================================== GDBus-debug:Return: >>>> METHOD RETURN in response to org.freedesktop.PolicyKit1.Authority.RegisterAuthenticationAgent() on object /org/freedesktop/PolicyKit1/Authority to name :1.2402 reply-serial 25 Signed-off-by: David Zeuthen <davidz@redhat.com>
This commit is contained in:
@@ -5883,10 +5883,12 @@ distribute_method_call (GDBusConnection *connection,
|
||||
"GDBus-debug:Incoming:\n"
|
||||
" <<<< METHOD INVOCATION %s.%s()\n"
|
||||
" on object %s\n"
|
||||
" invoked by name %s\n",
|
||||
" invoked by name %s\n"
|
||||
" serial %d\n",
|
||||
interface_name, member,
|
||||
path,
|
||||
g_dbus_message_get_sender (message) != NULL ? g_dbus_message_get_sender (message) : "(none)");
|
||||
g_dbus_message_get_sender (message) != NULL ? g_dbus_message_get_sender (message) : "(none)",
|
||||
g_dbus_message_get_serial (message));
|
||||
_g_dbus_debug_print_unlock ();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user