Add max-size, max-file logging options documentation (#3243)

This commit is contained in:
Ben Reichert 2017-05-13 22:14:01 -07:00 committed by Victoria Bialas
parent f578684e09
commit 07a105d724
1 changed files with 21 additions and 0 deletions

View File

@ -764,6 +764,27 @@ Logging options are key-value pairs. An example of `syslog` options:
options:
syslog-address: "tcp://192.168.0.42:123"
To limit the amount of logs stored there are two options key-value pairs:
options:
max-size: "200k"
max-file: "10"
This example would store log files until the reach a `max-size` of 200kB, and then rotate them.
The amount of individual log files stored is specified by the `max-file` value. As logs grow
beyond the max limits, older log files are removed to allow storage of new logs.
An example `docker-compose.yml` file that limits logging storage
services:
some-service:
image: some-service
logging:
driver: "json-file"
options:
max-size: "200k"
max-file: "10"
### network_mode
Network mode. Use the same values as the docker client `--net` parameter, plus