After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 767733 - [review] make logging of nm-openconnect configurable by NetworkManager [th/logging-bgo767733]
[review] make logging of nm-openconnect configurable by NetworkManager [th/lo...
Status: RESOLVED FIXED
Product: NetworkManager
Classification: Platform
Component: VPN: openconnect
git master
Other Linux
: Normal normal
: ---
Assigned To: David Woodhouse
NetworkManager maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2016-06-16 16:58 UTC by Thomas Haller
Modified: 2016-08-28 20:18 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Thomas Haller 2016-06-16 16:58:59 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)
Comment 1 Thomas Haller 2016-06-16 17:07:24 UTC
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(??).
Comment 2 Thomas Haller 2016-06-16 17:17:07 UTC
(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).
Comment 3 Thomas Haller 2016-06-17 06:27:15 UTC
(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