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 756175 - [review] add logging level "KEEP" and clear platform sysctl logging cache [th/logging-keep-bgo756175]
[review] add logging level "KEEP" and clear platform sysctl logging cache [th...
Status: RESOLVED FIXED
Product: NetworkManager
Classification: Platform
Component: general
git master
Other Linux
: Normal normal
: ---
Assigned To: NetworkManager maintainer(s)
NetworkManager maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2015-10-07 09:56 UTC by Thomas Haller
Modified: 2015-10-09 13:00 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Thomas Haller 2015-10-07 09:56:57 UTC
please review
Comment 1 Beniamino Galvani 2015-10-09 08:38:56 UTC
The idea sounds good, but this behavior is unexpected in my opinion:

  $ nmcli g l
  LEVEL  DOMAINS
  INFO   DNS,CORE
  $ nmcli g l level KEEP domains PPP:TRACE
  $ nmcli g l
  LEVEL  DOMAINS
  INFO   PPP:TRACE,DNS,CORE
  $ nmcli g l level ERR
  $ nmcli g l
  LEVEL  DOMAINS
  ERR    PPP:TRACE

Shouldn't the result be the like this?

  LEVEL  DOMAINS
  ERR    PPP,DNS,CORE

Maybe global.log_domains should be rebuilt when the global KEEP level
is set.
Comment 2 Thomas Haller 2015-10-09 10:17:11 UTC
(In reply to Beniamino Galvani from comment #1)
> The idea sounds good, but this behavior is unexpected in my opinion:
> 
>   $ nmcli g l
>   LEVEL  DOMAINS
>   INFO   DNS,CORE
>   $ nmcli g l level KEEP domains PPP:TRACE
>   $ nmcli g l
>   LEVEL  DOMAINS
>   INFO   PPP:TRACE,DNS,CORE
>   $ nmcli g l level ERR
>   $ nmcli g l
>   LEVEL  DOMAINS
>   ERR    PPP:TRACE
> 
> Shouldn't the result be the like this?
> 
>   LEVEL  DOMAINS
>   ERR    PPP,DNS,CORE
> 
> Maybe global.log_domains should be rebuilt when the global KEEP level
> is set.

What exactly is unexpected there?

When you did:

  nmcli g l level ERR

without specifying the domains,
it would do:

»···if (!domains || !*domains)
»···»···domains = global.log_domains ? global.log_domains : "DEFAULT";


Thus, in the previous command you set:

  global.log_domains = "PPP:TRACE"

and you end up with what you see.




That isn't at all related to the KEEP option and already present behavior.
But I agree, it's unexpected...
Comment 3 Thomas Haller 2015-10-09 10:51:18 UTC
(In reply to Thomas Haller from comment #2)
> (In reply to Beniamino Galvani from comment #1)

> That isn't at all related to the KEEP option and already present behavior.
> But I agree, it's unexpected...


OK, before the KEEP option this issue was not possible.

Pushed a new commit to fix this.


How is it now?
Comment 4 Beniamino Galvani 2015-10-09 12:20:38 UTC
(In reply to Thomas Haller from comment #3)
> Pushed a new commit to fix this.
>  
> How is it now?

Branch looks ok to me now. Pushed a couple of trivial fixes.
Comment 5 Thomas Haller 2015-10-09 13:00:03 UTC
(In reply to Beniamino Galvani from comment #4)
> (In reply to Thomas Haller from comment #3)
> > Pushed a new commit to fix this.
> >  
> > How is it now?
> 
> Branch looks ok to me now. Pushed a couple of trivial fixes.

Thanks


Merged to master:

http://cgit.freedesktop.org/NetworkManager/NetworkManager/commit/?id=c71c301c3b34092d8bdac3cec11f85c4fc737143