Skip to content
This repository has been archived by the owner on Nov 8, 2022. It is now read-only.

Snapd does not honor log level settings from config or command line flags for startup log messages. #889

Closed
lynxbat opened this issue Apr 29, 2016 · 4 comments

Comments

@lynxbat
Copy link
Contributor

lynxbat commented Apr 29, 2016

❯ go run ./snapd.go -t 0 -l 1                                                                                                                                                                                                                                                                     
INFO[0000] Starting snapd (version: unknown)            
INFO[0000] setting GOMAXPROCS to: 1 core(s)             
INFO[0000] Setting work manager queue size               _block=New _module=scheduler value=25
INFO[0000] Setting work manager pool size                _block=New _module=scheduler value=4
INFO[0000] Configuring REST API with HTTPS set to: false  _module=_mgmt-rest
INFO[0000] REST API is enabled                          
INFO[0000] control started                               _block=start _module=control
INFO[0000] module started                                _module=snapd block=main snap-module=control
INFO[0000] scheduler started                             _block=start-scheduler _module=scheduler
INFO[0000] module started                                _module=snapd block=main snap-module=scheduler
INFO[0000] Starting REST API on :8181                    _module=_mgmt-rest
INFO[0000] REST started                                  _block=start _module=_mgmt-rest
INFO[0000] module started                                _module=snapd block=main snap-module=REST
INFO[0000] setting plugin trust level to: disabled      
INFO[0000] auto discover path is disabled               
INFO[0000] snapd started 

It looks like the log level filtering is not set till after other operations are handled first.

lynxbat added a commit to lynxbat/snap that referenced this issue Apr 29, 2016
…nto an earlier call. This ensures that log messages for startup follow the log level setting.
@geauxvirtual
Copy link
Contributor

This was part of the design to always have configuration information for snapd present in the stdout or in the log files no matter the log level set by the user for troubleshooting purposes.

@lynxbat
Copy link
Contributor Author

lynxbat commented Apr 29, 2016

That doesn't make sense. If the user sets the log level to WARN they explicitly saying that don't want to see INFO or DEBUG. We should honor that.

@geauxvirtual
Copy link
Contributor

And we do after we print configuration data out, so that when they have an
issue and we ask for log data, we get the picture from when they were
running snapd when it failed. Not when they re-ran snapd with a different
log level setting just so we can configuration information.

But you know best.

On Fri, Apr 29, 2016 at 12:18 PM, Nicholas Weaver notifications@github.com
wrote:

That doesn't make sense. If the user sets the log level to WARN they
explicitly saying that don't want to see INFO or DEBUG. We should honor
that.


You are receiving this because you commented.
Reply to this email directly or view it on GitHub
#889 (comment)

Justin Guidroz

@lynxbat
Copy link
Contributor Author

lynxbat commented Apr 29, 2016

Which is solved by running -l 1

It is no different than running go test and go test -v

kindermoumoute pushed a commit to kindermoumoute/snap that referenced this issue Jun 3, 2016
… and command line flags for startup log messages
kindermoumoute pushed a commit to kindermoumoute/snap that referenced this issue Jun 4, 2016
… and command line flags for startup log messages
kindermoumoute pushed a commit to kindermoumoute/snap that referenced this issue Jun 4, 2016
… and command line flags for startup log messages
kindermoumoute pushed a commit to kindermoumoute/snap that referenced this issue Jun 6, 2016
Now snapd honors log level settings from config and command line flags for startup log messages.
kindermoumoute pushed a commit to kindermoumoute/snap that referenced this issue Jun 6, 2016
Now snapd honors log level settings from config and command line flags for startup log messages.
IRCody added a commit that referenced this issue Jun 6, 2016
Fixed #889: Made snapd honor log level settings
kindermoumoute pushed a commit to kindermoumoute/snap that referenced this issue Jun 7, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants