diff options
author | Thomas Haller <thaller@redhat.com> | 2015-11-27 10:34:38 +0100 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2015-11-27 14:22:05 +0100 |
commit | c97f7b54fee9e5c48b8269bdce708ec716c6a75a (patch) | |
tree | 16af87a926a5cc2b4a63dba06e970dd2c7996c91 | |
parent | 90683fcb3a4a60d2902ebb7e4a47419d76acb1d8 (diff) | |
download | NetworkManager-c97f7b54fee9e5c48b8269bdce708ec716c6a75a.tar.gz |
nmtst: support shorthand "NMTST_DEBUG=TRACE" to set logging level
-rw-r--r-- | include/nm-test-utils.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/nm-test-utils.h b/include/nm-test-utils.h index 9fc6fad618..09ba642769 100644 --- a/include/nm-test-utils.h +++ b/include/nm-test-utils.h @@ -69,6 +69,8 @@ * If you set the level to DEBUG or TRACE, it also sets G_MESSAGES_DEBUG=all (unless * in assert-logging mode and unless G_MESSAGES_DEBUG is already defined). * + * "TRACE", this is shorthand for "log-level=TRACE". + * * "sudo-cmd=PATH": when running root tests as normal user, the test will execute * itself by invoking sudo at PATH. * For example @@ -322,6 +324,9 @@ __nmtst_init (int *argc, char ***argv, gboolean assert_logging, const char *log_ } else if (!g_ascii_strncasecmp (debug, "log-level=", strlen ("log-level="))) { g_free (c_log_level); log_level = c_log_level = g_strdup (&debug[strlen ("log-level=")]); + } else if (!g_ascii_strcasecmp (debug, "TRACE")) { + g_free (c_log_level); + log_level = c_log_level = g_strdup (debug); } else if (!g_ascii_strncasecmp (debug, "log-domains=", strlen ("log-domains="))) { g_free (c_log_domains); log_domains = c_log_domains = g_strdup (&debug[strlen ("log-domains=")]); |