-
Notifications
You must be signed in to change notification settings - Fork 2
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
Enable log rotating #28
Comments
Docker has various logging options: https://docs.docker.com/config/containers/logging/ But I did see that the default is some JSON system, and it doesn't support any log rotating. So yes, this is important. I know nothing about it though. FYI, the command to start it in the background is |
The suggested plan seems to be
|
The logs now use log-driver:local, but we observe that bringing the containers down and back up wipes the logs. This is not ideal. Digging around, I found the comment:
This is still on the todo list. |
I looked further into this and it's not as obvious as the comment above implies. The current logs are not kept inside the container. They're in a container-specific folder on the host. ( There's a lot of blog discussion about centralizing your log files but they seem to boil down to three plans:
None of these sounds simple, unless you know more about journald than me. |
I see that when you do
docker-compose up --build
, log info goes to stdout. This should go to /var/log/unbox/unbox.log.Then we'd have to set up logrotate. Except I don't know exactly how to do that. For Apache, logrotate is configured to do "/etc/init.d/apache2 reload" after rotation so that the server closes and reopens its logging file handle. What is the equivalent here?
The text was updated successfully, but these errors were encountered: