summaryrefslogtreecommitdiff
path: root/shared/nm-utils/nm-test-utils.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 /shared/nm-utils/nm-test-utils.h
parent243051a8a62a01dc34a89cf9b3ea4d3ad961805b (diff)
downloadNetworkManager-th/libnm-core-split.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 'shared/nm-utils/nm-test-utils.h')
-rw-r--r--shared/nm-utils/nm-test-utils.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/shared/nm-utils/nm-test-utils.h b/shared/nm-utils/nm-test-utils.h
index d51f972ed4..cf884f9c41 100644
--- a/shared/nm-utils/nm-test-utils.h
+++ b/shared/nm-utils/nm-test-utils.h
@@ -733,7 +733,7 @@ nmtst_test_quick(void)
#define NMTST_EXPECT(domain, level, msg) g_test_expect_message(domain, level, msg)
-#define NMTST_EXPECT_LIBNM(level, msg) NMTST_EXPECT("libnm", level, msg)
+#define NMTST_EXPECT_LIBNM(level, msg) NMTST_EXPECT("nm", level, msg)
#define NMTST_EXPECT_LIBNM_WARNING(msg) NMTST_EXPECT_LIBNM(G_LOG_LEVEL_WARNING, msg)
#define NMTST_EXPECT_LIBNM_CRITICAL(msg) NMTST_EXPECT_LIBNM(G_LOG_LEVEL_CRITICAL, msg)