summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarco Trevisan (Treviño) <mail@3v1n0.net>2022-05-17 00:32:42 +0200
committerMarco Trevisan (Treviño) <mail@3v1n0.net>2022-06-07 03:18:38 +0200
commit07a2b2e32c442aa5c3d92f90828f99dcafe45d01 (patch)
treeb49b322d86089f01d2432d5cee01a473fc2ac501
parent8ce5daac4f3520a98ad3de8f95f9a52ad1b2e53b (diff)
downloadlibnotify-07a2b2e32c442aa5c3d92f90828f99dcafe45d01.tar.gz
notify-send: Add debug logs about the notification daemon
-rw-r--r--tools/notify-send.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/tools/notify-send.c b/tools/notify-send.c
index 926cd11..aea3435 100644
--- a/tools/notify-send.c
+++ b/tools/notify-send.c
@@ -203,6 +203,10 @@ main (int argc, char *argv[])
static char **n_text = NULL;
static char **hints = NULL;
static char **actions = NULL;
+ static char *server_name = NULL;
+ static char *server_vendor = NULL;
+ static char *server_version = NULL;
+ static char *server_spec_version = NULL;
static gboolean print_id = FALSE;
static gint notification_id = 0;
static gboolean do_version = FALSE;
@@ -310,6 +314,18 @@ main (int argc, char *argv[])
if (!notify_init ("notify-send"))
exit (1);
+ notify_get_server_info (&server_name,
+ &server_vendor,
+ &server_version,
+ &server_spec_version);
+
+ g_debug ("Using sever %s %s, v%s - Supporting Notification Spec %s",
+ server_name, server_vendor, server_version, server_spec_version);
+ g_free (server_name);
+ g_free (server_vendor);
+ g_free (server_version);
+ g_free (server_spec_version);
+
notify = g_object_new (NOTIFY_TYPE_NOTIFICATION,
"summary", summary,
"body", body,