-
Notifications
You must be signed in to change notification settings - Fork 196
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
Docker logs #152
Comments
Following https://pimylifeup.com/raspberry-pi-log2ram/, you can add additional paths into log2ram. |
It's a hard question. |
My solution is to dump all logs from Docker into journald: logging:
driver: journald
options:
tag: "container-{{.Name}}" |
This is a tough one and I am also looking for a better solution. I currently have Ideally I think a rotate-like feature in log2ram could address this. In such a mode the RAM content would be appended to the actual log file upon syncing and then discarded. Hence, log2ram would only retain the messages added since the last sync. |
Why not to just add an entry in /etc/rsyslog.d/ and rotate the logs as needed? If the logs are indeed huge (and really needed with that detail) the only real solution is to get a lot more RAM and use log2ram, or just go for an ssd… or in general if you need to manage a very large amount of logs, there are other options much better than plain text files such as logging to a separate log server with something such as loki (possibly with an SSD drive). Personally I prefer to use log2ram with a relatively short log rotation history on servers (because I don’t like to waste much RAM on logs) and store long term logs separately on Loki (at home) or on an Elasticsearch cluster (at office). |
For now I configured log rotation only for the Docker logs using their built-in mechanism for the JSON files. |
How to store Docker logs in log2ram disk?
The text was updated successfully, but these errors were encountered: