summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2016-09-01 15:09:01 +0200
committerThomas Haller <thaller@redhat.com>2016-09-02 17:51:24 +0200
commitf1745da5068c19722019132f0a3aafdc23dc8060 (patch)
tree2865ab30a184ecc389b0f88c6f33da627bc02919
parent90070eaf2ba6cc9c75abe76a8e5552464b8746b2 (diff)
downloadNetworkManager-f1745da5068c19722019132f0a3aafdc23dc8060.tar.gz
exported-object: use _NMLOG2() macro for logging property-changed signal
-rw-r--r--src/nm-exported-object.c23
1 files changed, 16 insertions, 7 deletions
diff --git a/src/nm-exported-object.c b/src/nm-exported-object.c
index f993674d4e..c55d9b0021 100644
--- a/src/nm-exported-object.c
+++ b/src/nm-exported-object.c
@@ -76,11 +76,20 @@ G_DEFINE_QUARK (NMExportedObjectClassInfo, nm_exported_object_class_info)
#define _NMLOG_DOMAIN LOGD_CORE
#define _NMLOG(level, ...) \
- nm_log (level, _NMLOG_DOMAIN, \
+ nm_log ((level), _NMLOG_DOMAIN, \
"%s[%p]: " _NM_UTILS_MACRO_FIRST (__VA_ARGS__), \
_NMLOG_PREFIX_NAME, (self) \
_NM_UTILS_MACRO_REST (__VA_ARGS__))
+#define _NMLOG2_PREFIX_NAME "properties-changed"
+#define _NMLOG2_DOMAIN LOGD_DBUS_PROPS
+
+#define _NMLOG2(level, ...) \
+ nm_log ((level), _NMLOG2_DOMAIN, \
+ "%s[%p]: " _NM_UTILS_MACRO_FIRST (__VA_ARGS__), \
+ _NMLOG2_PREFIX_NAME, (self) \
+ _NM_UTILS_MACRO_REST (__VA_ARGS__))
+
/*****************************************************************************/
/* "AddConnectionUnsaved" -> "handle-add-connection-unsaved" */
@@ -830,12 +839,12 @@ idle_emit_properties_changed (gpointer self)
variant = g_variant_ref_sink (g_variant_builder_end (&notifies));
- if (nm_logging_enabled (LOGL_DEBUG, LOGD_DBUS_PROPS)) {
+ if (_LOG2D_ENABLED ()) {
gs_free char *notification = g_variant_print (variant, TRUE);
- nm_log_dbg (LOGD_DBUS_PROPS, "properties-changed[%p]: type %s, iface %s: %s",
- self, G_OBJECT_TYPE_NAME (self), G_OBJECT_TYPE_NAME (ifdata->interface),
- notification);
+ _LOG2D ("type %s, iface %s: %s",
+ G_OBJECT_TYPE_NAME (self), G_OBJECT_TYPE_NAME (ifdata->interface),
+ notification);
}
g_signal_emit (ifdata->interface, ifdata->property_changed_signal_id, 0, variant);
@@ -877,8 +886,8 @@ nm_exported_object_notify (GObject *object, GParamSpec *pspec)
break;
}
if (!dbus_property_name) {
- nm_log_trace (LOGD_DBUS_PROPS, "properties-changed[%p]: ignoring notification for prop %s on type %s",
- self, pspec->name, G_OBJECT_TYPE_NAME (self));
+ _LOG2T ("ignoring notification for prop %s on type %s",
+ pspec->name, G_OBJECT_TYPE_NAME (self));
return;
}