summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2016-10-05 15:34:06 +0200
committerThomas Haller <thaller@redhat.com>2016-10-06 13:31:34 +0200
commit1098abe8c852d6bc76b960113838389555e3b532 (patch)
treefda33417665b7af917e38bfb122f5c49a4a23cfe
parent06b3b06a9535e7d9c22e419d40da565ba20a5426 (diff)
downloadNetworkManager-1098abe8c852d6bc76b960113838389555e3b532.tar.gz
iface-helper: set logging prefix
-rw-r--r--src/nm-iface-helper.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/nm-iface-helper.c b/src/nm-iface-helper.c
index 8e814a356d..ab5aee6953 100644
--- a/src/nm-iface-helper.c
+++ b/src/nm-iface-helper.c
@@ -95,10 +95,7 @@ static struct {
#define _NMLOG_PREFIX_NAME "nm-iface-helper"
#define _NMLOG(level, domain, ...) \
nm_log ((level), (domain), \
- "%s[%ld] (%s): " _NM_UTILS_MACRO_FIRST (__VA_ARGS__), \
- _NMLOG_PREFIX_NAME, \
- (long) getpid (), \
- global_opt.ifname \
+ "iface-helper: " _NM_UTILS_MACRO_FIRST (__VA_ARGS__) \
_NM_UTILS_MACRO_REST (__VA_ARGS__))
/*****************************************************************************/
@@ -369,6 +366,11 @@ main (int argc, char *argv[])
if (!do_early_setup (&argc, &argv))
return 1;
+ nm_logging_set_prefix ("%s[%ld] (%s): ",
+ _NMLOG_PREFIX_NAME,
+ (long) getpid (),
+ global_opt.ifname ?: "???");
+
if (global_opt.g_fatal_warnings) {
GLogLevelFlags fatal_mask;