summaryrefslogtreecommitdiff
path: root/src/nm-logging.c
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2014-04-14 14:26:13 +0200
committerThomas Haller <thaller@redhat.com>2014-10-05 18:24:36 +0200
commitbdea7d61d031c4cf1912dbc018e533f5b98556a4 (patch)
tree1779fe43721ad22a8a7ee192bb130dce0553f917 /src/nm-logging.c
parentc9e0e66a80429cc6564e47425c86856136d4a329 (diff)
downloadNetworkManager-bdea7d61d031c4cf1912dbc018e533f5b98556a4.tar.gz
logging: add new logging level "TRACE"
Signed-off-by: Thomas Haller <thaller@redhat.com>
Diffstat (limited to 'src/nm-logging.c')
-rw-r--r--src/nm-logging.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/nm-logging.c b/src/nm-logging.c
index c8deee0614..70d5304891 100644
--- a/src/nm-logging.c
+++ b/src/nm-logging.c
@@ -68,6 +68,7 @@ typedef struct {
} LogDesc;
static const char *level_names[LOGL_MAX] = {
+ [LOGL_TRACE] = "TRACE",
[LOGL_DEBUG] = "DEBUG",
[LOGL_INFO] = "INFO",
[LOGL_WARN] = "WARN",
@@ -405,6 +406,12 @@ _nm_log (const char *loc,
va_end (args);
switch (level) {
+ case LOGL_TRACE:
+ g_get_current_time (&tv);
+ syslog_level = LOG_DEBUG;
+ g_log_level = G_LOG_LEVEL_DEBUG;
+ fullmsg = g_strdup_printf ("<trace> [%ld.%06ld] [%s] %s(): %s", tv.tv_sec, tv.tv_usec, loc, func, msg);
+ break;
case LOGL_DEBUG:
g_get_current_time (&tv);
syslog_level = LOG_INFO;