diff options
author | Thomas Haller <thaller@redhat.com> | 2020-12-07 22:14:03 +0100 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2020-12-07 22:15:46 +0100 |
commit | dcd0066b104850d6da4035ac942f4044ec6979ef (patch) | |
tree | 74cdddaea3df8e02e0f8bdd00d62c630c522e29b /libnm | |
parent | e5113a7fd91b42ff16ff675660cdc27fae0bd80c (diff) | |
download | NetworkManager-dcd0066b104850d6da4035ac942f4044ec6979ef.tar.gz |
libnm: add debug logging for creating/destroying NMObject
Diffstat (limited to 'libnm')
-rw-r--r-- | libnm/nm-object.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/libnm/nm-object.c b/libnm/nm-object.c index 1b12915dd4..8c64a124dd 100644 --- a/libnm/nm-object.c +++ b/libnm/nm-object.c @@ -248,6 +248,10 @@ nm_object_init(NMObject *object) self->_priv = priv; c_list_init(&self->obj_base.queue_notify_lst); + + NML_DBUS_LOG(_NML_NMCLIENT_LOG_LEVEL_COERCE(NML_DBUS_LOG_LEVEL_TRACE), + "nmobj[" NM_HASH_OBFUSCATE_PTR_FMT "]: creating", + NM_HASH_OBFUSCATE_PTR(self)); } static void @@ -256,6 +260,12 @@ dispose(GObject *object) NMObject * self = NM_OBJECT(object); NMObjectPrivate *priv = NM_OBJECT_GET_PRIVATE(self); + if (!self->obj_base.is_disposing) { + NML_DBUS_LOG(_NML_NMCLIENT_LOG_LEVEL_COERCE(NML_DBUS_LOG_LEVEL_TRACE), + "nmobj[" NM_HASH_OBFUSCATE_PTR_FMT "]: disposing", + NM_HASH_OBFUSCATE_PTR(self)); + } + self->obj_base.is_disposing = TRUE; nm_assert(c_list_is_empty(&self->obj_base.queue_notify_lst)); |