-
Notifications
You must be signed in to change notification settings - Fork 802
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: allow log level to be set to any level #1345
feat: allow log level to be set to any level #1345
Conversation
Why do you consider the result of a session "debug" information? What is it that you are looking for in the logs if the summary of a run is "too much"? |
It's a fine line sure, I get your point. In my case I'm trying to use watchtower to check the local docker registry every second for new images. So the logs are getting full of "Session done" messages. It would be fine if I could actually control the general watchtower logging level that's going to stderr (I'd just set it to WARN). Seems that I can change the notification logging level, but that does not effect general logging it seems, only the mail, slack etc notification system. |
This is way too much of an edge case to warrant changing the defaults. Having it as INFO likely is what most users would expect. |
@simskij OK, understood. Am I correct that there is no way (flag, env var) to configure the default logging? I understand I can change the Notification logging level that sends out emails, slack messages, etc.—but not the 'console' logging. For my use case (checking local registry every second), that is what I first attempted to do. |
That is kind of correct. You can switch to tracing or debugging, but that really is the opposite of what you're looking for. I would suggest extending the command line arguments with a flag to set the level to a less permissive one, following the same pattern as in Lines 90 to 95 in 1465768
|
Agreed. Using the new flag handling patterns, the |
Codecov Report
@@ Coverage Diff @@
## main #1345 +/- ##
==========================================
+ Coverage 64.85% 64.98% +0.12%
==========================================
Files 23 23
Lines 2302 2319 +17
==========================================
+ Hits 1493 1507 +14
- Misses 712 714 +2
- Partials 97 98 +1
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
When using watch tower for a convenient way to reload freshly built images from the local Docker registry (with --no-pull and a poll interval of one second), the "Session done" log message spams the logs: `level=info msg="Session done" Failed=0 Scanned=3 Updated=0 notify=no`. Since this is really debug-oriented messaging, seems appropriate.
This reverts commit bb2986a.
c3787b2
to
5653b76
Compare
When using watch tower for a convenient way to reload freshly built images from the local Docker registry (with --no-pull and a poll interval of one second), the "Session done" log message spams the logs:
level=info msg="Session done" Failed=0 Scanned=3 Updated=0 notify=no
.Since this is really debug-oriented messaging, seems appropriate.