From a63867a40b009509bf172ebd3088eb8f2d474322 Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Wed, 5 Oct 2016 17:51:33 +0200 Subject: [PATCH] build: use NetworkManager logging domain for device and settings plugins First of all, G_LOG_DOMAIN only matters when using g_log() directly. Inside core, we always want to log via nm-logging. Every call to a g_log() is a bug in the first place (like a failed assertion that logs a g_critical() during g_return_if_fail()). So, for all practic purposes, the logging domain is not used. For nm-logging, the G_LOG_DOMAIN has no effect. Unless we find a proper use of this domain, G_LOG_DOMAIN should not differ from what the rest of core. --- src/devices/adsl/Makefile.am | 2 +- src/devices/bluetooth/Makefile.am | 2 +- src/devices/team/Makefile.am | 2 +- src/devices/wifi/Makefile.am | 2 +- src/devices/wifi/tests/Makefile.am | 2 +- src/devices/wwan/Makefile.am | 2 +- src/settings/plugins/ibft/Makefile.am | 2 +- src/settings/plugins/ibft/tests/Makefile.am | 2 +- src/settings/plugins/ifcfg-rh/Makefile.am | 2 +- src/settings/plugins/ifcfg-rh/tests/Makefile.am | 2 +- src/settings/plugins/ifnet/Makefile.am | 4 ++-- src/settings/plugins/ifnet/tests/Makefile.am | 2 +- src/settings/plugins/ifupdown/Makefile.am | 2 +- src/settings/plugins/ifupdown/tests/Makefile.am | 2 +- src/settings/plugins/keyfile/Makefile.am | 2 +- src/settings/plugins/keyfile/tests/Makefile.am | 2 +- 16 files changed, 17 insertions(+), 17 deletions(-) diff --git a/src/devices/adsl/Makefile.am b/src/devices/adsl/Makefile.am index d7f23970bc..a1908de4ea 100644 --- a/src/devices/adsl/Makefile.am +++ b/src/devices/adsl/Makefile.am @@ -14,7 +14,7 @@ AM_CPPFLAGS = \ -I$(top_builddir)/shared \ -I${top_builddir}/libnm-core \ -I${top_srcdir}/libnm-core \ - -DG_LOG_DOMAIN=\""NetworkManager-adsl"\" \ + -DG_LOG_DOMAIN=\""NetworkManager"\" \ -DNETWORKMANAGER_COMPILATION=NM_NETWORKMANAGER_COMPILATION_INSIDE_DAEMON \ $(GUDEV_CFLAGS) diff --git a/src/devices/bluetooth/Makefile.am b/src/devices/bluetooth/Makefile.am index 7ac7bff0ec..951807aa47 100644 --- a/src/devices/bluetooth/Makefile.am +++ b/src/devices/bluetooth/Makefile.am @@ -16,7 +16,7 @@ AM_CPPFLAGS = \ -I$(top_builddir)/shared \ -I${top_builddir}/libnm-core \ -I${top_srcdir}/libnm-core \ - -DG_LOG_DOMAIN=\""NetworkManager-bluetooth"\" \ + -DG_LOG_DOMAIN=\""NetworkManager"\" \ -DNETWORKMANAGER_COMPILATION=NM_NETWORKMANAGER_COMPILATION_INSIDE_DAEMON \ $(GLIB_CFLAGS) diff --git a/src/devices/team/Makefile.am b/src/devices/team/Makefile.am index f2ad28d1cd..da9d5b2e7c 100644 --- a/src/devices/team/Makefile.am +++ b/src/devices/team/Makefile.am @@ -15,7 +15,7 @@ AM_CPPFLAGS = \ -I$(top_builddir)/shared \ -I${top_builddir}/libnm-core \ -I${top_srcdir}/libnm-core \ - -DG_LOG_DOMAIN=\""NetworkManager-team"\" \ + -DG_LOG_DOMAIN=\""NetworkManager"\" \ -DNETWORKMANAGER_COMPILATION=NM_NETWORKMANAGER_COMPILATION_INSIDE_DAEMON \ $(GLIB_CFLAGS) diff --git a/src/devices/wifi/Makefile.am b/src/devices/wifi/Makefile.am index 04a9cca093..121a874f26 100644 --- a/src/devices/wifi/Makefile.am +++ b/src/devices/wifi/Makefile.am @@ -18,7 +18,7 @@ AM_CPPFLAGS = \ -I$(top_builddir)/shared \ -I${top_builddir}/libnm-core \ -I${top_srcdir}/libnm-core \ - -DG_LOG_DOMAIN=\""NetworkManager-wifi"\" \ + -DG_LOG_DOMAIN=\""NetworkManager"\" \ -DNETWORKMANAGER_COMPILATION=NM_NETWORKMANAGER_COMPILATION_INSIDE_DAEMON \ $(GLIB_CFLAGS) diff --git a/src/devices/wifi/tests/Makefile.am b/src/devices/wifi/tests/Makefile.am index 80f552fb9a..4ad66261b2 100644 --- a/src/devices/wifi/tests/Makefile.am +++ b/src/devices/wifi/tests/Makefile.am @@ -8,7 +8,7 @@ AM_CPPFLAGS = \ -I$(top_srcdir)/src \ -I$(top_srcdir)/src/devices/wifi \ -I$(top_builddir)/src \ - -DG_LOG_DOMAIN=\""NetworkManager-wifi"\" \ + -DG_LOG_DOMAIN=\""NetworkManager"\" \ -DNETWORKMANAGER_COMPILATION=NM_NETWORKMANAGER_COMPILATION_INSIDE_DAEMON \ $(GLIB_CFLAGS) diff --git a/src/devices/wwan/Makefile.am b/src/devices/wwan/Makefile.am index 845951d14c..7f7e6e8b41 100644 --- a/src/devices/wwan/Makefile.am +++ b/src/devices/wwan/Makefile.am @@ -15,7 +15,7 @@ AM_CPPFLAGS = \ -I$(top_builddir)/shared \ -I${top_srcdir}/libnm-core \ -I${top_builddir}/libnm-core \ - -DG_LOG_DOMAIN=\""NetworkManager-wwan"\" \ + -DG_LOG_DOMAIN=\""NetworkManager"\" \ -DNETWORKMANAGER_COMPILATION=NM_NETWORKMANAGER_COMPILATION_INSIDE_DAEMON \ $(GLIB_CFLAGS) \ $(LIBSYSTEMD_CFLAGS) \ diff --git a/src/settings/plugins/ibft/Makefile.am b/src/settings/plugins/ibft/Makefile.am index d19f36f2d9..7a0957f80d 100644 --- a/src/settings/plugins/ibft/Makefile.am +++ b/src/settings/plugins/ibft/Makefile.am @@ -20,7 +20,7 @@ AM_CPPFLAGS = \ -I$(top_builddir)/libnm-core \ -DNETWORKMANAGER_COMPILATION=NM_NETWORKMANAGER_COMPILATION_INSIDE_DAEMON \ $(GLIB_CFLAGS) \ - -DG_LOG_DOMAIN=\""NetworkManager-ibft"\" \ + -DG_LOG_DOMAIN=\""NetworkManager"\" \ -DSYSCONFDIR=\"$(sysconfdir)\" \ -DSBINDIR=\"$(sbindir)\" diff --git a/src/settings/plugins/ibft/tests/Makefile.am b/src/settings/plugins/ibft/tests/Makefile.am index 15710f27e1..2c8df42099 100644 --- a/src/settings/plugins/ibft/tests/Makefile.am +++ b/src/settings/plugins/ibft/tests/Makefile.am @@ -15,7 +15,7 @@ AM_CPPFLAGS = \ -I$(top_srcdir)/src/platform \ -I$(top_srcdir)/src/settings \ -I$(srcdir)/../ \ - -DG_LOG_DOMAIN=\""NetworkManager-ibft"\" \ + -DG_LOG_DOMAIN=\""NetworkManager"\" \ -DNETWORKMANAGER_COMPILATION=NM_NETWORKMANAGER_COMPILATION_INSIDE_DAEMON \ -DTEST_IBFT_DIR=\"$(abs_srcdir)\" \ -DTEST_SCRATCH_DIR=\"$(abs_builddir)/\" diff --git a/src/settings/plugins/ifcfg-rh/Makefile.am b/src/settings/plugins/ifcfg-rh/Makefile.am index d2899a26af..2792d68c62 100644 --- a/src/settings/plugins/ifcfg-rh/Makefile.am +++ b/src/settings/plugins/ifcfg-rh/Makefile.am @@ -50,7 +50,7 @@ AM_CPPFLAGS = \ -DNETWORKMANAGER_COMPILATION=NM_NETWORKMANAGER_COMPILATION_INSIDE_DAEMON \ $(GLIB_CFLAGS) \ $(NSS_CFLAGS) \ - -DG_LOG_DOMAIN=\""NetworkManager-ifcfg-rh"\" \ + -DG_LOG_DOMAIN=\""NetworkManager"\" \ -DSYSCONFDIR=\"$(sysconfdir)\" \ -DSBINDIR=\"$(sbindir)\" diff --git a/src/settings/plugins/ifcfg-rh/tests/Makefile.am b/src/settings/plugins/ifcfg-rh/tests/Makefile.am index 4a28a81a2b..134191c5d4 100644 --- a/src/settings/plugins/ifcfg-rh/tests/Makefile.am +++ b/src/settings/plugins/ifcfg-rh/tests/Makefile.am @@ -17,7 +17,7 @@ AM_CPPFLAGS = \ -I$(top_srcdir)/src/platform \ -I$(top_srcdir)/src/settings \ -I$(srcdir)/../ \ - -DG_LOG_DOMAIN=\""NetworkManager-ifcfg-rh"\" \ + -DG_LOG_DOMAIN=\""NetworkManager"\" \ -DNETWORKMANAGER_COMPILATION=NM_NETWORKMANAGER_COMPILATION_INSIDE_DAEMON \ -DTEST_IFCFG_DIR=\"$(abs_srcdir)\" \ -DTEST_SCRATCH_DIR=\"$(abs_builddir)/\" \ diff --git a/src/settings/plugins/ifnet/Makefile.am b/src/settings/plugins/ifnet/Makefile.am index 68e80356e7..0d90aad34e 100644 --- a/src/settings/plugins/ifnet/Makefile.am +++ b/src/settings/plugins/ifnet/Makefile.am @@ -10,7 +10,7 @@ AM_CPPFLAGS = \ -I$(top_builddir)/shared \ -I$(top_srcdir)/libnm-core \ -I$(top_builddir)/libnm-core \ - -DG_LOG_DOMAIN=\""NetworkManager-ifnet"\" \ + -DG_LOG_DOMAIN=\""NetworkManager"\" \ -DNETWORKMANAGER_COMPILATION=NM_NETWORKMANAGER_COMPILATION_INSIDE_DAEMON \ $(GLIB_CFLAGS) \ -DSYSCONFDIR=\"$(sysconfdir)\" @@ -24,7 +24,7 @@ libnm_settings_plugin_ifnet_la_SOURCES = \ nm-ifnet-connection.c \ nm-ifnet-connection.h \ plugin.c \ - plugin.h + plugin.h libnm_settings_plugin_ifnet_la_LDFLAGS = -module -avoid-version diff --git a/src/settings/plugins/ifnet/tests/Makefile.am b/src/settings/plugins/ifnet/tests/Makefile.am index 0cdcb81549..bdecfa10e5 100644 --- a/src/settings/plugins/ifnet/tests/Makefile.am +++ b/src/settings/plugins/ifnet/tests/Makefile.am @@ -13,7 +13,7 @@ AM_CPPFLAGS= \ -I$(top_srcdir)/src \ -I$(top_srcdir)/src/settings \ -I$(top_srcdir)/src/platform \ - -DG_LOG_DOMAIN=\""NetworkManager-ifnet"\" \ + -DG_LOG_DOMAIN=\""NetworkManager"\" \ -DNETWORKMANAGER_COMPILATION=NM_NETWORKMANAGER_COMPILATION_INSIDE_DAEMON \ $(CHECK_CFLAGS) \ $(GLIB_CFLAGS) \ diff --git a/src/settings/plugins/ifupdown/Makefile.am b/src/settings/plugins/ifupdown/Makefile.am index 94b0be54e2..dbea6be612 100644 --- a/src/settings/plugins/ifupdown/Makefile.am +++ b/src/settings/plugins/ifupdown/Makefile.am @@ -9,7 +9,7 @@ AM_CPPFLAGS = \ -I$(top_builddir)/shared \ -I$(top_srcdir)/libnm-core \ -I$(top_builddir)/libnm-core \ - -DG_LOG_DOMAIN=\""NetworkManager-ifupdown"\" \ + -DG_LOG_DOMAIN=\""NetworkManager"\" \ -DNETWORKMANAGER_COMPILATION=NM_NETWORKMANAGER_COMPILATION_INSIDE_DAEMON \ $(GLIB_CFLAGS) \ $(GUDEV_CFLAGS) \ diff --git a/src/settings/plugins/ifupdown/tests/Makefile.am b/src/settings/plugins/ifupdown/tests/Makefile.am index 1dab1ce798..6a4dcdf800 100644 --- a/src/settings/plugins/ifupdown/tests/Makefile.am +++ b/src/settings/plugins/ifupdown/tests/Makefile.am @@ -10,7 +10,7 @@ AM_CPPFLAGS = \ -I$(top_srcdir)/src \ -I$(top_srcdir)/src/settings \ -I$(srcdir)/../ \ - -DG_LOG_DOMAIN=\""NetworkManager-ifupdown"\" \ + -DG_LOG_DOMAIN=\""NetworkManager"\" \ -DNETWORKMANAGER_COMPILATION=NM_NETWORKMANAGER_COMPILATION_INSIDE_DAEMON \ $(GLIB_CFLAGS) \ -DTEST_ENI_DIR=\"$(abs_srcdir)\" diff --git a/src/settings/plugins/keyfile/Makefile.am b/src/settings/plugins/keyfile/Makefile.am index 08119dae98..42c6188989 100644 --- a/src/settings/plugins/keyfile/Makefile.am +++ b/src/settings/plugins/keyfile/Makefile.am @@ -9,7 +9,7 @@ AM_CPPFLAGS = \ -I$(top_builddir)/shared \ -I$(top_srcdir)/libnm-core \ -I$(top_builddir)/libnm-core \ - -DG_LOG_DOMAIN=\""NetworkManager-keyfile"\" \ + -DG_LOG_DOMAIN=\""NetworkManager"\" \ -DNETWORKMANAGER_COMPILATION=NM_NETWORKMANAGER_COMPILATION_INSIDE_DAEMON \ $(GLIB_CFLAGS) \ -DNMCONFDIR=\"$(nmconfdir)\" diff --git a/src/settings/plugins/keyfile/tests/Makefile.am b/src/settings/plugins/keyfile/tests/Makefile.am index fd08b896e7..a697787fe3 100644 --- a/src/settings/plugins/keyfile/tests/Makefile.am +++ b/src/settings/plugins/keyfile/tests/Makefile.am @@ -14,7 +14,7 @@ AM_CPPFLAGS = \ -I$(srcdir)/../ \ $(GLIB_CFLAGS) \ $(CODE_COVERAGE_CFLAGS) \ - -DG_LOG_DOMAIN=\""NetworkManager-keyfile"\" \ + -DG_LOG_DOMAIN=\""NetworkManager"\" \ -DNETWORKMANAGER_COMPILATION=NM_NETWORKMANAGER_COMPILATION_INSIDE_DAEMON \ -DTEST_KEYFILES_DIR=\"$(abs_srcdir)/keyfiles\" \ -DTEST_SCRATCH_DIR=\"$(abs_builddir)/keyfiles\" \