Skip to content
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

Limit size of logs to 1GB by default (10 files × 100 MB), add ability to configure logging drivers. Fixes #762 #788

Open
wants to merge 1 commit into
base: mupx
Choose a base branch
from

Conversation

artpolikarpov
Copy link

Now logs can not fill the entire disc, see initial issue. Limits are configurable. As bonus we’re now able even to change logging driver to syslog, fluentd, or whatever.

I have not updated readme, because not sure in my English. I’ll write about the new features here. I hope someone else will complement the readme on this basis.

Now possible to configure logging drivers via log object in mup.json.

Rotating logs

To set limits of logs to 5 files 200 MB each:

"log": {
  "max-size": "200m",
  "max-file": 5
}

If you want single 1 GB file:

"log": {
  "max-size": "1g",
  "max-file": 1
}

Send logs to third-party

Let’s send our logs to Logentries:

"log": {
  "driver": "syslog",
  "syslog-address": "tcp://data.logentries.com:10123"
}

Note! Accesing logs via mupx logs command works only with default driver which is json-file.

Options reference

All of the possible drivers and options can be found here: https://docs.docker.com/v1.8/reference/logging/overview/

Compatibility

This works via --log-driver and --log-opt flags, which appeared in Docker v1.8. So deploy process can fail if you use an older Docker.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant