summaryrefslogtreecommitdiff
path: root/src/core/nm-test-utils-core.h
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2021-02-17 16:11:49 +0100
committerThomas Haller <thaller@redhat.com>2021-02-18 19:46:57 +0100
commit341b6e0704daf460d823c66ee83d441c26084a94 (patch)
tree4d2ad9c23a5c948d558100058720bef7ecdd14d4 /src/core/nm-test-utils-core.h
parent243051a8a62a01dc34a89cf9b3ea4d3ad961805b (diff)
downloadNetworkManager-341b6e0704daf460d823c66ee83d441c26084a94.tar.gz
all: change G_LOG_DOMAIN to "nm"th/libnm-core-split
glib requires G_LOG_DOMAIN defined so that log messages are labeled to belong to NetworkManager or libnm. However, we don't actually want to use glib logging. Our library libnm MUST not log anything, because it spams the user's stdout/stderr. Instead, a library must report notable events via its API. Note that there is also LIBNM_CLIENT_DEBUG to explicitly enable debug logging, but that doesn't use glib logging either. Also, the daemon does not use glib logging instead it logs to syslog. When run with `--debug`. Hence, it's not useful for us to define different G_LOG_DOMAIN per library/application, because none of our libraries/applications should use glib logging. It also gets slightly confusing, because we have the static library like `src/libnm-core-impl`, which is both linked into `libnm` (the library) and `NetworkManager` (the daemon). Which logging domain should they use? Set the G_LOG_DOMAIN to "nm" everywhere. But no longer do it via `-D` arguments to the compiler. See-also: https://developer.gnome.org/glib/stable/glib-Message-Logging.html#G-LOG-DOMAIN:CAPS
Diffstat (limited to 'src/core/nm-test-utils-core.h')
-rw-r--r--src/core/nm-test-utils-core.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/core/nm-test-utils-core.h b/src/core/nm-test-utils-core.h
index 5bde9cdaab..a765e1a3c2 100644
--- a/src/core/nm-test-utils-core.h
+++ b/src/core/nm-test-utils-core.h
@@ -15,7 +15,7 @@
/*****************************************************************************/
-#define NMTST_EXPECT_NM(level, msg) NMTST_EXPECT("NetworkManager", level, msg)
+#define NMTST_EXPECT_NM(level, msg) NMTST_EXPECT("nm", level, msg)
#define NMTST_EXPECT_NM_ERROR(msg) NMTST_EXPECT_NM(G_LOG_LEVEL_MESSAGE, "*<error> [*] " msg)
#define NMTST_EXPECT_NM_WARN(msg) NMTST_EXPECT_NM(G_LOG_LEVEL_MESSAGE, "*<warn> [*] " msg)