From c7180460dd1f314c8931d1f7193f6a677927ebd1 Mon Sep 17 00:00:00 2001 From: Pi-Yueh Chuang Date: Thu, 11 Mar 2021 19:29:52 -0500 Subject: [PATCH] resolve #6092 IconThemePath is not a standard property in XDG's StatusNotifierItem specification, so missing this property should not be logged as an error. This patch changes the log level to SWAY_DEBUG when swaybar queries the value of IconThemePath so that swaybar won't log the returned message as an error if IconThemePath does not exist. --- swaybar/tray/item.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/swaybar/tray/item.c b/swaybar/tray/item.c index a5660f623..fba95d03b 100644 --- a/swaybar/tray/item.c +++ b/swaybar/tray/item.c @@ -115,10 +115,11 @@ static int get_property_callback(sd_bus_message *msg, void *data, const char *prop = d->prop; const char *type = d->type; void *dest = d->dest; + sway_log_importance_t log_lv = strcmp(prop, "IconThemePath") ? SWAY_ERROR : SWAY_DEBUG; int ret; if (sd_bus_message_is_method_error(msg, NULL)) { - sway_log(SWAY_ERROR, "%s %s: %s", sni->watcher_id, prop, + sway_log(log_lv, "%s %s: %s", sni->watcher_id, prop, sd_bus_message_get_error(msg)->message); ret = sd_bus_message_get_errno(msg); goto cleanup;