core: log setup of singleton instances

This commit is contained in:
Thomas Haller 2015-07-26 11:48:05 +02:00
parent 2cf274c03e
commit cc16e94562
4 changed files with 10 additions and 3 deletions

View file

@ -500,6 +500,8 @@ nm_auth_manager_setup (gboolean polkit_enabled)
singleton_instance = self;
nm_singleton_instance_register ();
nm_log_dbg (LOGD_CORE, "setup %s singleton (%p)", "NMAuthManager", singleton_instance);
return self;
}

View file

@ -103,7 +103,7 @@ nm_bus_manager_setup (NMBusManager *instance)
already_setup = TRUE;
singleton_instance = instance;
nm_singleton_instance_register ();
nm_log_dbg (LOGD_CORE, "create %s singleton (%p)", "NMBusManager", singleton_instance);
nm_log_dbg (LOGD_CORE, "setup %s singleton (%p)", "NMBusManager", singleton_instance);
}
/**************************************************************/

View file

@ -1686,8 +1686,13 @@ nm_config_setup (const NMConfigCmdLineOptions *cli, char **atomic_section_prefix
g_assert (!singleton_instance);
singleton_instance = nm_config_new (cli, atomic_section_prefixes, error);
if (singleton_instance)
if (singleton_instance) {
nm_singleton_instance_register ();
/* usually, you would not see this logging line because when creating the
* NMConfig instance, the logging is not yet set up to print debug message. */
nm_log_dbg (LOGD_CORE, "setup %s singleton (%p)", "NMConfig", singleton_instance);
}
return singleton_instance;
}

View file

@ -156,7 +156,7 @@ nm_platform_setup (NMPlatform *instance)
nm_singleton_instance_register ();
nm_log_dbg (LOGD_CORE, "setup NMPlatform singleton (%p, %s)", instance, G_OBJECT_TYPE_NAME (instance));
nm_log_dbg (LOGD_CORE, "setup %s singleton (%p, %s)", "NMPlatform", singleton_instance, G_OBJECT_TYPE_NAME (instance));
}
/**