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.
This commit is contained in:
Pi-Yueh Chuang 2021-03-11 19:29:52 -05:00
parent ba6c0eb18b
commit c7180460dd
No known key found for this signature in database
GPG key ID: 4D88B842DD03DDE4

View file

@ -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;