mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-12 02:10:19 +01:00
logging: protect VPN_PLUGIN logging domain
VPN_PLUGIN is special. With # nmcli general logging level TRACE domains ALL the logging verbosity of VPN_PLUGIN domain should not be set higher then info. The user has to explicitly set it via: # nmcli general logging level TRACE domains ALL,VPN_PLUGIN:TRACE This was not the case for # nmcli general logging level TRACE Fix that.
This commit is contained in:
parent
64951f07fb
commit
64e02a0ac7
1 changed files with 8 additions and 1 deletions
|
|
@ -329,6 +329,13 @@ nm_logging_setup (const char *level,
|
|||
|
||||
bits = 0;
|
||||
|
||||
if (domains_free) {
|
||||
/* The caller didn't provide any domains to set (`nmcli general logging level DEBUG`).
|
||||
* We reset all domains that were previously set, but we still want to protect
|
||||
* VPN_PLUGIN domain. */
|
||||
protect = LOGD_VPN_PLUGIN;
|
||||
}
|
||||
|
||||
/* Check for combined domains */
|
||||
if (!g_ascii_strcasecmp (*iter, LOGD_ALL_STRING)) {
|
||||
bits = LOGD_ALL;
|
||||
|
|
@ -380,7 +387,7 @@ nm_logging_setup (const char *level,
|
|||
new_logging[i] &= ~bits;
|
||||
else {
|
||||
new_logging[i] |= bits;
|
||||
if ( protect
|
||||
if ( (protect & bits)
|
||||
&& i < LOGL_INFO)
|
||||
new_logging[i] &= ~protect;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue