-
Notifications
You must be signed in to change notification settings - Fork 891
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: improve HTTP API logging, honor no-startup-message #1091
Conversation
Codecov Report
@@ Coverage Diff @@
## main #1091 +/- ##
=======================================
Coverage 61.96% 61.96%
=======================================
Files 22 22
Lines 1438 1438
=======================================
Hits 891 891
Misses 463 463
Partials 84 84 Continue to review full report at Codecov.
|
I don't think it is that straight forward. It essentially replaces the startup message and when |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree with @piksel on this.
ACK, reworking it to use |
While the log message is useful in seeing the HTTP API is enabled and functioning, in production installations it should be silenced to prevent notifications going out on every startup with the API enabled.
@piksel PTAL. I left the Example run:
|
There is still a slight annoyance left where watchtower is very silent and unhelpful, but I believe this is a deeper issue than I can resolve here:
i.e. if the API mode is enabled but no periodic updates are enabled as is the default, startup messages aren't processed at all since the call is blocked. Probably they should still happen, but then the flow needs to be changed a bit and my Go isn't exactly that good to do it in this PR without undue risk to general stability. :-) Edit: nvm, found a clean way to fix this issue at the same time. |
To prevent these getting sent as notifications, use --no-startup-message
Previously the info was logged only if a single run was requested but now also the default API mode has a zero length schedule.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, except for a few smaller things.
The API parts are messy and should be redone (ref #939). But this should be sufficient for now. Just take a look at the comments.
I believe these have been addressed but GitHub still marks this comment as blocking merge for some reason. |
They provide little useful information outside debugging and anything at
Info level is broadcast over shoutrrr.