diff options
author | Thomas Haller <thaller@redhat.com> | 2016-09-01 15:09:01 +0200 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2016-09-02 20:13:36 +0200 |
commit | ba713e8381ee8276bee998b6ecaf263558fd6a4f (patch) | |
tree | a0668a2f9f756b378c7486a8864a7d0d9bc5549a | |
parent | b9c1868b451eb7ef92e6924ee8d3dcca0397865d (diff) | |
download | NetworkManager-ba713e8381ee8276bee998b6ecaf263558fd6a4f.tar.gz |
exported-object: use _NMLOG2() macro for logging property-changed signal
-rw-r--r-- | src/nm-exported-object.c | 23 |
1 files changed, 16 insertions, 7 deletions
diff --git a/src/nm-exported-object.c b/src/nm-exported-object.c index c05161ea16..32b5ec05dd 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 (¬ifies)); - 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; } |