Skip to content

Commit ebfe67a

Browse files
Make the specification of max-buffer-size discoverable. (#20562)
* Make the specification of max-buffer-size discoverable. It's not obvious what type of strings are accepted by `max-buffer-size` nor is it obvious what e.g. `4m` means. Four _minutes_? (to me, it looks like something accepted by [ParseDuration](https://pkg.go.dev/time#ParseDuration). Instead we should direct users to the relevant documentation to explain clearly what's allowed and what the units are. * Update configure.md
1 parent fd2dbcf commit ebfe67a

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

content/engine/logging/configure.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -150,9 +150,11 @@ STDERR or STDOUT streams block.
150150
The `mode` log option controls whether to use the `blocking` (default) or
151151
`non-blocking` message delivery.
152152

153-
The `max-buffer-size` log option controls the size of the buffer used for
154-
intermediate message storage when `mode` is set to `non-blocking`. `max-buffer-size`
155-
defaults to 1 megabyte.
153+
The `max-buffer-size` controls the size of the buffer used for
154+
intermediate message storage when `mode` is set to `non-blocking`.
155+
The default is `1m` meaning 1 MB (1 million bytes).
156+
See [function `FromHumanSize()` in the `go-units` package](https://pkg.go.dev/github.com/docker/go-units#FromHumanSize) for the allowed format strings,
157+
some examples are `1KiB` for 1024 bytes, `2g` for 2 billion bytes.
156158

157159
The following example starts an Alpine container with log output in non-blocking
158160
mode and a 4 megabyte buffer:

0 commit comments

Comments
 (0)