Home Explore Blog Models CI



docker

2nd chunk of `content/manuals/engine/logging/drivers/gelf.md`
dbb480f09d2b85e5e4bc1cdba7db67fafbbeaea87e95e9580000000100000a33
| :------------------------- | :------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :------------------------------------------------- |
| `gelf-address`             | required | The address of the GELF server. `tcp` and `udp` are the only supported URI specifier and you must specify the port.                                                                                                                                                                 | `--log-opt gelf-address=udp://192.168.0.42:12201`  |
| `gelf-compression-type`    | optional | `UDP Only` The type of compression the GELF driver uses to compress each log message. Allowed values are `gzip`, `zlib` and `none`. The default is `gzip`. Note that enabled compression leads to excessive CPU usage, so it's highly recommended to set this to `none`.            | `--log-opt gelf-compression-type=gzip`             |
| `gelf-compression-level`   | optional | `UDP Only` The level of compression when `gzip` or `zlib` is the `gelf-compression-type`. An integer in the range of `-1` to `9` (BestCompression). Default value is 1 (BestSpeed). Higher levels provide more compression at lower speed. Either `-1` or `0` disables compression. | `--log-opt gelf-compression-level=2`               |
| `gelf-tcp-max-reconnect`   | optional | `TCP Only` The maximum number of reconnection attempts when the connection drop. A positive integer. Default value is 3.                                                                                                                                                            | `--log-opt gelf-tcp-max-reconnect=3`               |
| `gelf-tcp-reconnect-delay` | optional | `TCP Only` The number of seconds to wait between reconnection attempts. A positive integer. Default value is 1.                                                                                                                                                                     | `--log-opt gelf-tcp-reconnect-delay=1`             |
| `tag`                      | optional | A string that's appended to the `APP-NAME` in the `gelf` message. By default, Docker uses the first 12 characters of the container ID to tag log messages. Refer to the [log tag option documentation](log_tags.md) for customizing the log tag format.                             | `--log-opt tag=mailer`                             |

Title: GELF Logging Driver Options (Continued)
Summary
This section details additional options for the `gelf` logging driver in Docker. It includes descriptions, requirements, and example values for options such as `gelf-compression-level`, `gelf-tcp-max-reconnect`, `gelf-tcp-reconnect-delay`, and `tag`. These options allow for further customization of GELF log message compression, TCP reconnection behavior, and tagging of log messages.