GNOME Bugzilla – Bug 767733
[review] make logging of nm-openconnect configurable by NetworkManager [th/logging-bgo767733]
Last modified: 2016-08-28 20:18:39 UTC
Since recently, NetworkManager knows a logging domain VPN_PLUGIN: $ nmcli general logging level KEEP domains VPN_PLUGIN:TRACE in that case, it will set the environment variable NM_VPN_LOG_LEVEL for the vpn service, which then can be more ore less verbose. Extend nm-openconnect to support that. (I didn't actually test the code yet)
this actually has a change in behavior... by default, the VPN_PLUGIN domain is disabled, thus NetworkManager will set NM_VPN_LOG_LEVEL=0. Hence, all g_warnings() that were printed before are now silent too. Note that VPN_PLUGIN is also not part of ALL, that is $ nmcli general logging level TRACE domains ALL will not include VPN_PLUGIN. The reason is, that we want to avoid sensitive data in the logfile and unless the user explicitly enables it, VPNs are silent. Note sure that reasoning holds, but that's it. Maybe we should not treat VPN_PLUGIN special, and just let it default to INFO (LOG_NOTICE) like all other plugins... That would preserve previous behavior. Another change in behavior is, that if you used to start the service with --debug, NetworkManager will overrule that configuration. Maybe --debug for the plugin should overrule NM_VPN_LOG_LEVEL(??).
(In reply to Thomas Haller from comment #1) > Another change in behavior is, that if you used to start the service with > --debug, NetworkManager will overrule that configuration. Maybe --debug for > the plugin should overrule NM_VPN_LOG_LEVEL(??). (ignore this, I was wrong. This only applies when NM starts the service, in which case it does not set --debug).
(In reply to Thomas Haller from comment #1) > this actually has a change in behavior... by default, the VPN_PLUGIN domain > is disabled, thus NetworkManager will set NM_VPN_LOG_LEVEL=0. > > Hence, all g_warnings() that were printed before are now silent too. this is now fixed too: https://cgit.freedesktop.org/NetworkManager/NetworkManager/commit/?id=4143fbde177bfac29d28904a47102208dd34bec7
already merged a while ago: https://git.gnome.org/browse/network-manager-openconnect/commit/?id=6471069f28250ef7973e09c92f0a3e2922a730b5