logging: add log domain for D-Bus PropertiesChanged signal stuff

Otherwise it really clutters up the CORE logging when debugging is
enabled.
This commit is contained in:
Dan Williams 2013-08-06 16:29:09 -05:00
parent 75c64763f6
commit 3c6d789c62
3 changed files with 6 additions and 4 deletions

View file

@ -49,9 +49,9 @@ nm_log_handler (const gchar *log_domain,
LOGD_SUPPLICANT | LOGD_AGENTS | LOGD_SETTINGS | LOGD_SUSPEND | \
LOGD_CORE | LOGD_DEVICE | LOGD_OLPC_MESH | LOGD_WIMAX | \
LOGD_INFINIBAND | LOGD_FIREWALL | LOGD_ADSL | LOGD_BOND | \
LOGD_VLAN | LOGD_BRIDGE)
LOGD_VLAN | LOGD_BRIDGE | LOGD_DBUS_PROPS)
#define LOGD_DEFAULT (LOGD_ALL & ~LOGD_WIFI_SCAN)
#define LOGD_DEFAULT (LOGD_ALL & ~(LOGD_WIFI_SCAN | LOGD_DBUS_PROPS))
static guint32 log_level = LOGL_INFO | LOGL_WARN | LOGL_ERR;
static guint32 log_domains = LOGD_DEFAULT;
@ -102,6 +102,7 @@ static const LogDesc domain_descs[] = {
{ LOGD_BOND, "BOND" },
{ LOGD_VLAN, "VLAN" },
{ LOGD_BRIDGE, "BRIDGE" },
{ LOGD_DBUS_PROPS,"DBUS_PROPS" },
{ 0, NULL }
};

View file

@ -58,6 +58,7 @@ enum {
LOGD_BOND = 0x08000000,
LOGD_VLAN = 0x10000000,
LOGD_BRIDGE = 0x20000000,
LOGD_DBUS_PROPS = 0x40000000,
};
#define LOGD_DHCP (LOGD_DHCP4 | LOGD_DHCP6)

View file

@ -106,7 +106,7 @@ properties_changed (gpointer data)
GString *buf = g_string_new (NULL);
g_hash_table_foreach (info->hash, add_to_string, buf);
nm_log_dbg (LOGD_CORE, "%s -> %s", G_OBJECT_TYPE_NAME (object), buf->str);
nm_log_dbg (LOGD_DBUS_PROPS, "%s -> %s", G_OBJECT_TYPE_NAME (object), buf->str);
g_string_free (buf, TRUE);
}
@ -146,7 +146,7 @@ notify (GObject *object, GParamSpec *pspec)
break;
}
if (!dbus_property_name) {
nm_log_dbg (LOGD_CORE, "ignoring notification for prop %s on type %s",
nm_log_dbg (LOGD_DBUS_PROPS, "ignoring notification for prop %s on type %s",
pspec->name, G_OBJECT_TYPE_NAME (object));
return;
}