mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-20 23:20:06 +01:00
nmtst: support shorthand "NMTST_DEBUG=TRACE" to set logging level
This commit is contained in:
parent
90683fcb3a
commit
c97f7b54fe
1 changed files with 5 additions and 0 deletions
|
|
@ -69,6 +69,8 @@
|
||||||
* If you set the level to DEBUG or TRACE, it also sets G_MESSAGES_DEBUG=all (unless
|
* 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).
|
* 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
|
* "sudo-cmd=PATH": when running root tests as normal user, the test will execute
|
||||||
* itself by invoking sudo at PATH.
|
* itself by invoking sudo at PATH.
|
||||||
* For example
|
* 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="))) {
|
} else if (!g_ascii_strncasecmp (debug, "log-level=", strlen ("log-level="))) {
|
||||||
g_free (c_log_level);
|
g_free (c_log_level);
|
||||||
log_level = c_log_level = g_strdup (&debug[strlen ("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="))) {
|
} else if (!g_ascii_strncasecmp (debug, "log-domains=", strlen ("log-domains="))) {
|
||||||
g_free (c_log_domains);
|
g_free (c_log_domains);
|
||||||
log_domains = c_log_domains = g_strdup (&debug[strlen ("log-domains=")]);
|
log_domains = c_log_domains = g_strdup (&debug[strlen ("log-domains=")]);
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue