Skip to content

Commit

Permalink
Adds details about new non-blocking logging mode
Browse files Browse the repository at this point in the history
This functionality was added in moby/moby#28762.
It allows a user to specify what to do in cases when a log message can't
be sent, block the container's stdio or drop messages.

Also removes an erronious entry about a `nats` log driver, which does
not exist.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
  • Loading branch information
cpuguy83 authored and Misty Stanley-Jones committed Apr 6, 2017
1 parent cff043f commit 786555a
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions engine/admin/logging/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,13 @@ This example starts an `alpine` container with the `none` log driver.
$ docker run -it --log-driver none alpine ash
```

### Options for all drivers
| Option | Description | Example value |
|-------------------|-------------|---------------|
| `mode` | Sets the logging mode, accepted values are `blocking` (default), and `non-blocking`. When `non-blocking` is set, if the log buffer fills up, log messages will be lost. How messages are dropped is left undefined. | `--log-opt mode=non-blocking`
| `max-buffer-size` | Applicable only when `mode` is set to `non-blocking`, this sets the maxmimum size of the log buffer. Once this size is reach, log messages will be dropped. | `--log-opt max-buffer-size 5m`


## `json-file`

`json-file` is the default logging driver, and returns logging output in JSON
Expand Down

1 comment on commit 786555a

@binman-docker
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @mstanleyjones and @cpuguy83 - did these docs move somewhere else? I was looking for info on mode=non-blocking and couldn't find it anywhere.

I don't see it on the docs site (https://docs.docker.com/engine/admin/logging/overview/) and it looks like the info was removed in this commit: 10be60a#diff-96dad27b1f1b2d5635618127e1a72981

Searching using the built-in search and also google search doesn't yield any documentation on it. Maybe it was moved and I'm failing to find it?

Please sign in to comment.