You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When the container is recycled, the logs are lost. The workaround is to use another logging tool, but that is unnecessary complexity, especially for small deployments.
Also, in general, the logs are not in a friendly format - it's much simpler, especially in small deployments, to simply have the log in a file that can be easily manipulated. Not everyone uses large complex logging apps and servers, etc.
Describe the solution you'd like
Many apps have an option to log to file as well.
It would be nice if the log could be sent to a file instead of (or in addition to) stdout. If enabled, it could be written to /var/log/watchtower.log by default.
Personally, I would mount it as /var/log/watchtower.log:/var/log/watchtower.log so that I could have it on the host, and use logrotate on it.
And of course if one sends a USR1 signal to the app it should release and recreate the file (so the host can work on it, e.g. logrotate).
Describe alternatives you've considered
An unnecessarily complicated environment that includes log aggregation and monitoring, and who knows what else. For small servers that is overkill and hard to manage.
Additional context
Thank you for considering it!
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem?
Watchtower seems to log to
stdout
only, and thus to docker's built-in "json driver". The logs can be access like so:$ docker logs -t $CONTAINER_NAME
tail -f /var/lib/docker/containers/$CONTAINER_ID/$CONTAINER_ID-json.log
When the container is recycled, the logs are lost. The workaround is to use another logging tool, but that is unnecessary complexity, especially for small deployments.
Also, in general, the logs are not in a friendly format - it's much simpler, especially in small deployments, to simply have the log in a file that can be easily manipulated. Not everyone uses large complex logging apps and servers, etc.
Describe the solution you'd like
Many apps have an option to log to file as well.
It would be nice if the log could be sent to a file instead of (or in addition to) stdout. If enabled, it could be written to
/var/log/watchtower.log
by default.Personally, I would mount it as
/var/log/watchtower.log:/var/log/watchtower.log
so that I could have it on the host, and use logrotate on it.And of course if one sends a
USR1
signal to the app it should release and recreate the file (so the host can work on it, e.g. logrotate).Describe alternatives you've considered
An unnecessarily complicated environment that includes log aggregation and monitoring, and who knows what else. For small servers that is overkill and hard to manage.
Additional context
Thank you for considering it!
The text was updated successfully, but these errors were encountered: