summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2014-10-05 20:31:42 +0200
committerThomas Haller <thaller@redhat.com>2014-10-05 20:31:59 +0200
commit33e50e817bc8cf842509e2d1bbd480c5a9638d38 (patch)
treef0143511deb85502cfd4e3baa21911faa98e3a2e
parentc9e0e66a80429cc6564e47425c86856136d4a329 (diff)
parent1ac3a1de235f778dfd0992ee040c6a827f5add9c (diff)
downloadNetworkManager-33e50e817bc8cf842509e2d1bbd480c5a9638d38.tar.gz
logging: merge branch 'th/bgo737593_log_trace'
https://bugzilla.gnome.org/show_bug.cgi?id=737593 Signed-off-by: Thomas Haller <thaller@redhat.com>
-rw-r--r--introspection/nm-manager.xml4
-rw-r--r--man/NetworkManager.conf.xml.in11
-rw-r--r--po/el.po4
-rw-r--r--po/en_GB.po4
-rw-r--r--po/eo.po2
-rw-r--r--po/gl.po4
-rw-r--r--po/id.po4
-rw-r--r--po/sl.po4
-rw-r--r--po/tr.po2
-rw-r--r--src/nm-dbus-manager.c6
-rw-r--r--src/nm-logging.c7
-rw-r--r--src/nm-logging.h2
12 files changed, 31 insertions, 23 deletions
diff --git a/introspection/nm-manager.xml b/introspection/nm-manager.xml
index 78021f73da..ac9bec6676 100644
--- a/introspection/nm-manager.xml
+++ b/introspection/nm-manager.xml
@@ -217,7 +217,7 @@
</tp:docstring>
<arg name="level" type="s" direction="in">
<tp:docstring>
- One of [ERR, WARN, INFO, DEBUG].
+ One of [ERR, WARN, INFO, DEBUG, TRACE].
</tp:docstring>
</arg>
<arg name="domains" type="s" direction="in">
@@ -246,7 +246,7 @@
</tp:docstring>
<arg name="level" type="s" direction="out">
<tp:docstring>
- One of [ERR, WARN, INFO, DEBUG].
+ One of [ERR, WARN, INFO, DEBUG, TRACE].
</tp:docstring>
</arg>
<arg name="domains" type="s" direction="out">
diff --git a/man/NetworkManager.conf.xml.in b/man/NetworkManager.conf.xml.in
index 06aa403a8b..fcb4dfc4e8 100644
--- a/man/NetworkManager.conf.xml.in
+++ b/man/NetworkManager.conf.xml.in
@@ -316,11 +316,12 @@ unmanaged-devices=mac:00:22:68:1c:59:b1;mac:00:1E:65:30:D1:C4;interface-name:eth
<listitem><para>The default logging verbosity level.
One of <literal>ERR</literal>,
<literal>WARN</literal>, <literal>INFO</literal>,
- <literal>DEBUG</literal>. The ERR level logs only critical
- errors. WARN logs warnings that may reflect operation.
- INFO logs various informational messages that are useful for
- tracking state and operations. DEBUG enables verbose
- logging for debugging purposes. Subsequent levels also log
+ <literal>DEBUG</literal>, <literal>TRACE</literal>. The ERR
+ level logs only critical errors. WARN logs warnings that may
+ reflect operation. INFO logs various informational messages that
+ are useful for tracking state and operations. DEBUG enables
+ verbose logging for debugging purposes. TRACE enables even more
+ verbose logging then DEBUG level. Subsequent levels also log
all messages from earlier levels; thus setting the log level
to INFO also logs error and warning messages.</para></listitem>
</varlistentry>
diff --git a/po/el.po b/po/el.po
index db8cf543dc..fffbd31bc8 100644
--- a/po/el.po
+++ b/po/el.po
@@ -2532,8 +2532,8 @@ msgstr "plugin1,plugin2"
#. Translators: Do not translate the values in the square brackets
#: ../src/main.c:384
-msgid "Log level: one of [ERR, WARN, INFO, DEBUG]"
-msgstr "Επίπεδο καταγραφής: ένα από τα [ERR, WARN, INFO, DEBUG]"
+msgid "Log level: one of [ERR, WARN, INFO, DEBUG, TRACE]"
+msgstr "Επίπεδο καταγραφής: ένα από τα [ERR, WARN, INFO, DEBUG, TRACE]"
#. Translators: Do not translate the values in the square brackets
#: ../src/main.c:387
diff --git a/po/en_GB.po b/po/en_GB.po
index 3997ed51f1..f1dea3f938 100644
--- a/po/en_GB.po
+++ b/po/en_GB.po
@@ -2469,8 +2469,8 @@ msgstr "plugin1,plugin2"
#. Translators: Do not translate the values in the square brackets
#: ../src/main.c:384
-msgid "Log level: one of [ERR, WARN, INFO, DEBUG]"
-msgstr "Log level: one of [ERR, WARN, INFO, DEBUG]"
+msgid "Log level: one of [ERR, WARN, INFO, DEBUG, TRACE]"
+msgstr "Log level: one of [ERR, WARN, INFO, DEBUG, TRACE]"
#. Translators: Do not translate the values in the square brackets
#: ../src/main.c:387
diff --git a/po/eo.po b/po/eo.po
index c466a5d206..51fceb9ee5 100644
--- a/po/eo.po
+++ b/po/eo.po
@@ -2321,7 +2321,7 @@ msgstr ""
#. Translators: Do not translate the values in the square brackets
#: ../src/main.c:376
-msgid "Log level: one of [ERR, WARN, INFO, DEBUG]"
+msgid "Log level: one of [ERR, WARN, INFO, DEBUG, TRACE]"
msgstr ""
#. Translators: Do not translate the values in the square brackets
diff --git a/po/gl.po b/po/gl.po
index 5dc613df04..f2a6d89d78 100644
--- a/po/gl.po
+++ b/po/gl.po
@@ -2608,8 +2608,8 @@ msgstr "engadido1,engadido2"
#. Translators: Do not translate the values in the square brackets
#: ../src/main.c:371
-msgid "Log level: one of [ERR, WARN, INFO, DEBUG]"
-msgstr "Nivel de rexistroÑ un de [ERR, WARN, INFO, DEBUG]"
+msgid "Log level: one of [ERR, WARN, INFO, DEBUG, TRACE]"
+msgstr "Nivel de rexistroÑ un de [ERR, WARN, INFO, DEBUG, TRACE]"
#. Translators: Do not translate the values in the square brackets
#: ../src/main.c:374
diff --git a/po/id.po b/po/id.po
index 0288338646..67ed28e75b 100644
--- a/po/id.po
+++ b/po/id.po
@@ -2463,8 +2463,8 @@ msgstr "plugin1,plugin2"
#. Translators: Do not translate the values in the square brackets
#: ../src/main.c:384
-msgid "Log level: one of [ERR, WARN, INFO, DEBUG]"
-msgstr "Aras log: satu dari [ERR, WARN, INFO, DEBUG]"
+msgid "Log level: one of [ERR, WARN, INFO, DEBUG, TRACE]"
+msgstr "Aras log: satu dari [ERR, WARN, INFO, DEBUG, TRACE]"
#. Translators: Do not translate the values in the square brackets
#: ../src/main.c:387
diff --git a/po/sl.po b/po/sl.po
index ddd4e08e9f..3cad67f7c3 100644
--- a/po/sl.po
+++ b/po/sl.po
@@ -2593,8 +2593,8 @@ msgstr "vstavek1,vstavek2"
#. Translators: Do not translate the values in the square brackets
#: ../src/main.c:383
-msgid "Log level: one of [ERR, WARN, INFO, DEBUG]"
-msgstr "Raven beleženja: ena izmed [ERR, WARN, INFO, DEBUG]"
+msgid "Log level: one of [ERR, WARN, INFO, DEBUG, TRACE]"
+msgstr "Raven beleženja: ena izmed [ERR, WARN, INFO, DEBUG, TRACE]"
#. Translators: Do not translate the values in the square brackets
#: ../src/main.c:386
diff --git a/po/tr.po b/po/tr.po
index 713163b44e..f15b3c1516 100644
--- a/po/tr.po
+++ b/po/tr.po
@@ -2935,7 +2935,7 @@ msgstr "eklenti1,eklenti2"
#. Translators: Do not translate the values in the square brackets
#: ../src/main.c:336
-msgid "Log level: one of [ERR, WARN, INFO, DEBUG]"
+msgid "Log level: one of [ERR, WARN, INFO, DEBUG, TRACE]"
msgstr ""
#. Translators: Do not translate the values in the square brackets
diff --git a/src/nm-dbus-manager.c b/src/nm-dbus-manager.c
index 46abe3612d..1dcdfb8dad 100644
--- a/src/nm-dbus-manager.c
+++ b/src/nm-dbus-manager.c
@@ -450,10 +450,8 @@ private_connection_new (NMDBusManager *self, DBusGConnection *connection)
g_hash_table_iter_init (&iter, priv->exported);
while (g_hash_table_iter_next (&iter, (gpointer) &object, (gpointer) &path)) {
dbus_g_connection_register_g_object (connection, path, object);
- /*
- nm_log_dbg (LOGD_CORE, "(%s) registered %p (%s) at '%s' on private socket.",
- PRIV_SOCK_TAG, object, G_OBJECT_TYPE_NAME (object), path);
- */
+ nm_log_trace (LOGD_CORE, "(%s) registered %p (%s) at '%s' on private socket.",
+ PRIV_SOCK_TAG, object, G_OBJECT_TYPE_NAME (object), path);
}
}
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;
diff --git a/src/nm-logging.h b/src/nm-logging.h
index 2158ec0672..4239a20dda 100644
--- a/src/nm-logging.h
+++ b/src/nm-logging.h
@@ -77,6 +77,7 @@ enum {
/* Log levels */
enum {
+ LOGL_TRACE,
LOGL_DEBUG,
LOGL_INFO,
LOGL_WARN,
@@ -98,6 +99,7 @@ GQuark nm_logging_error_quark (void);
#define nm_log_warn(domain, ...) nm_log (LOGL_WARN, (domain), __VA_ARGS__)
#define nm_log_info(domain, ...) nm_log (LOGL_INFO, (domain), __VA_ARGS__)
#define nm_log_dbg(domain, ...) nm_log (LOGL_DEBUG, (domain), __VA_ARGS__)
+#define nm_log_trace(domain, ...) nm_log (LOGL_TRACE, (domain), __VA_ARGS__)
/* nm_log() only evaluates it's argument list after checking
* whether logging for the given level/domain is enabled. */