summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2016-03-11 16:11:04 +0100
committerThomas Haller <thaller@redhat.com>2016-03-17 15:00:48 +0100
commitc75c51d50545a56888aa6c35244fcee5510c5697 (patch)
tree5eb0379f483df1ec35e7ad22d3c60ccd86a103af /src
parent0330a55851652aedd75bf56f41e8a083b2a3be82 (diff)
downloadNetworkManager-c75c51d50545a56888aa6c35244fcee5510c5697.tar.gz
logging: add new logging domain "SYSTEMD" for internal systemd logging
Diffstat (limited to 'src')
-rw-r--r--src/nm-logging.c3
-rw-r--r--src/nm-logging.h1
-rw-r--r--src/systemd/nm-sd-adapt.h2
3 files changed, 4 insertions, 2 deletions
diff --git a/src/nm-logging.c b/src/nm-logging.c
index 704c77c969..935b34a8e3 100644
--- a/src/nm-logging.c
+++ b/src/nm-logging.c
@@ -111,7 +111,7 @@ static struct {
char *logging_domains_to_string;
const LogLevelDesc level_desc[_LOGL_N];
-#define _DOMAIN_DESC_LEN 36
+#define _DOMAIN_DESC_LEN 37
/* Would be nice to use C99 flexible array member here,
* but that feature doesn't seem well supported. */
const LogDesc domain_desc[_DOMAIN_DESC_LEN];
@@ -164,6 +164,7 @@ static struct {
{ LOGD_DCB, "DCB" },
{ LOGD_DISPATCH, "DISPATCH" },
{ LOGD_AUDIT, "AUDIT" },
+ { LOGD_SYSTEMD, "SYSTEMD" },
{ 0, NULL }
/* keep _DOMAIN_DESC_LEN in sync */
},
diff --git a/src/nm-logging.h b/src/nm-logging.h
index 41b5c16007..27f89f5d5b 100644
--- a/src/nm-logging.h
+++ b/src/nm-logging.h
@@ -64,6 +64,7 @@ typedef enum { /*< skip >*/
LOGD_DCB = (1LL << 32), /* Data Center Bridging */
LOGD_DISPATCH = (1LL << 33),
LOGD_AUDIT = (1LL << 34),
+ LOGD_SYSTEMD = (1LL << 35),
__LOGD_MAX,
LOGD_ALL = ((__LOGD_MAX - 1LL) << 1) - 1LL,
diff --git a/src/systemd/nm-sd-adapt.h b/src/systemd/nm-sd-adapt.h
index 4fa0f5c18d..010c8a80f6 100644
--- a/src/systemd/nm-sd-adapt.h
+++ b/src/systemd/nm-sd-adapt.h
@@ -53,7 +53,7 @@ _slog_level_to_nm (int slevel)
const int _nm_e = (error); \
const NMLogLevel _nm_l = _slog_level_to_nm ((level)); \
\
- if (nm_logging_enabled (_nm_l, LOGD_DHCP)) { \
+ if (nm_logging_enabled (_nm_l, LOGD_SYSTEMD)) { \
const char *_nm_location = strrchr ((""file), '/'); \
\
_nm_log_impl (_nm_location ? _nm_location + 1 : (""file), (line), (func), _nm_l, LOGD_DHCP, _nm_e, ("%s"format), "libsystemd: ", ## __VA_ARGS__); \