diff --git a/config/containers/logging/fluentd.md b/config/containers/logging/fluentd.md index 10163f1e82..105dce1ca3 100644 --- a/config/containers/logging/fluentd.md +++ b/config/containers/logging/fluentd.md @@ -98,16 +98,17 @@ Refer to the [log tag option documentation](log_tags.md) for customizing the log tag format. -### labels, env, and env-regex +### labels, labels-regex, env, and env-regex The `labels` and `env` options each take a comma-separated list of keys. If there is collision between `label` and `env` keys, the value of the `env` takes precedence. Both options add additional fields to the extra attributes of a logging message. -The `env-regex` option is similar to and compatible with `env`. Its value is a -regular expression to match logging-related environment variables. It is used -for advanced [log tag options](log_tags.md). +The `env-regex` and `labels-regex` options are similar to and compatible with +respectively `env` and `labels`. Their values are regular expressions to match +logging-related environment variables and labels. It is used for advanced +[log tag options](log_tags.md). ### fluentd-async-connect diff --git a/config/containers/logging/gcplogs.md b/config/containers/logging/gcplogs.md index eed7ecd4b1..c162553a13 100644 --- a/config/containers/logging/gcplogs.md +++ b/config/containers/logging/gcplogs.md @@ -66,6 +66,7 @@ Cloud Logging driver options: | `gcp-project` | optional | Which GCP project to log to. Defaults to discovering this value from the GCE metadata service. | | `gcp-log-cmd` | optional | Whether to log the command that the container was started with. Defaults to false. | | `labels` | optional | Comma-separated list of keys of labels, which should be included in message, if these labels are specified for the container. | +| `labels-regex` | optional | Similar to and compatible with `labels`. A regular expression to match logging-related labels. Used for advanced [log tag options](log_tags.md). | | `env` | optional | Comma-separated list of keys of environment variables, which should be included in message, if these variables are specified for the container. | | `env-regex` | optional | Similar to and compatible with `env`. A regular expression to match logging-related environment variables. Used for advanced [log tag options](log_tags.md). | | `gcp-meta-zone` | optional | Zone name for the instance. | diff --git a/config/containers/logging/gelf.md b/config/containers/logging/gelf.md index cefe755543..deff9cd1c7 100644 --- a/config/containers/logging/gelf.md +++ b/config/containers/logging/gelf.md @@ -69,6 +69,7 @@ The `gelf` logging driver supports the following options: | `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 is 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` | | `labels` | optional | Applies when starting the Docker daemon. A comma-separated list of logging-related labels this daemon accepts. Adds additional key on the `extra` fields, prefixed by an underscore (`_`). Used for advanced [log tag options](log_tags.md). | `--log-opt labels=production_status,geo` | +| `labels-regex` | optional | Similar to and compatible with `labels`. A regular expression to match logging-related labels. Used for advanced [log tag options](log_tags.md). | `--log-opt labels-regex=^(production_status|geo)` | | `env` | optional | Applies when starting the Docker daemon. A comma-separated list of logging-related environment variables this daemon accepts. Adds additional key on the `extra` fields, prefixed by an underscore (`_`). Used for advanced [log tag options](log_tags.md). | `--log-opt env=os,customer` | | `env-regex` | optional | Similar to and compatible with `env`. A regular expression to match logging-related environment variables. Used for advanced [log tag options](log_tags.md). | `--log-opt env-regex=^(os|customer)` | diff --git a/config/containers/logging/journald.md b/config/containers/logging/journald.md index deed066cf8..563625bdd1 100644 --- a/config/containers/logging/journald.md +++ b/config/containers/logging/journald.md @@ -58,6 +58,7 @@ driver options. |:---------------|:---------|:------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | `tag` | optional | Specify template to set `CONTAINER_TAG` and `SYSLOG_IDENTIFIER` value in journald logs. Refer to [log tag option documentation](log_tags.md) to customize the log tag format. | | `labels` | optional | Comma-separated list of keys of labels, which should be included in message, if these labels are specified for the container. | +| `labels-regex` | optional | Similar to and compatible with labels. A regular expression to match logging-related labels. Used for advanced [log tag options](log_tags.md). | | `env` | optional | Comma-separated list of keys of environment variables, which should be included in message, if these variables are specified for the container. | | `env-regex` | optional | Similar to and compatible with env. A regular expression to match logging-related environment variables. Used for advanced [log tag options](log_tags.md). | diff --git a/config/containers/logging/json-file.md b/config/containers/logging/json-file.md index 32314452eb..80a4a75160 100644 --- a/config/containers/logging/json-file.md +++ b/config/containers/logging/json-file.md @@ -65,8 +65,9 @@ The `json-file` logging driver supports the following logging options: | `max-size` | The maximum size of the log before it is rolled. A positive integer plus a modifier representing the unit of measure (`k`, `m`, or `g`). Defaults to -1 (unlimited). | `--log-opt max-size=10m` | | `max-file` | The maximum number of log files that can be present. If rolling the logs creates excess files, the oldest file is removed. **Only effective when `max-size` is also set.** A positive integer. Defaults to 1. | `--log-opt max-file=3` | | `labels` | Applies when starting the Docker daemon. A comma-separated list of logging-related labels this daemon accepts. Used for advanced [log tag options](log_tags.md). | `--log-opt labels=production_status,geo` | +| `labels-regex` | Similar to and compatible with `labels`. A regular expression to match logging-related labels. Used for advanced [log tag options](log_tags.md). | `--log-opt labels-regex=^(production_status|geo)` | | `env` | Applies when starting the Docker daemon. A comma-separated list of logging-related environment variables this daemon accepts. Used for advanced [log tag options](log_tags.md). | `--log-opt env=os,customer` | -| `env-regex` | Similar to and compatible with `env`. A regular expression to match logging-related environment variables. Used for advanced [log tag options](log_tags.md). | `--log-opt env-regex=^(os|customer).` | +| `env-regex` | Similar to and compatible with `env`. A regular expression to match logging-related environment variables. Used for advanced [log tag options](log_tags.md). | `--log-opt env-regex=^(os|customer)` | | `compress` | Toggles compression for rotated logs. Default is `disabled`. | `--log-opt compress=true` | diff --git a/config/containers/logging/splunk.md b/config/containers/logging/splunk.md index 9afb9c99e4..95fa989ffb 100644 --- a/config/containers/logging/splunk.md +++ b/config/containers/logging/splunk.md @@ -75,6 +75,7 @@ The following properties let you configure the splunk logging driver. | `splunk-gzip-level` | optional | Set compression level for gzip. Valid values are -1 (default), 0 (no compression), 1 (best speed) ... 9 (best compression). Defaults to [DefaultCompression](https://golang.org/pkg/compress/gzip/#DefaultCompression). | | `tag` | optional | Specify tag for message, which interpret some markup. Default value is {% raw %}`{{.ID}}`{% endraw %} (12 characters of the container ID). Refer to the [log tag option documentation](log_tags.md) for customizing the log tag format. | | `labels` | optional | Comma-separated list of keys of labels, which should be included in message, if these labels are specified for container. | +| `labels-regex` | optional | Similar to and compatible with `labels`. A regular expression to match logging-related labels. Used for advanced [log tag options](log_tags.md). | | `env` | optional | Comma-separated list of keys of environment variables, which should be included in message, if these variables are specified for container. | | `env-regex` | optional | Similar to and compatible with `env`. A regular expression to match logging-related environment variables. Used for advanced [log tag options](log_tags.md). | diff --git a/config/containers/logging/syslog.md b/config/containers/logging/syslog.md index 03a6e454d3..529fae95d6 100644 --- a/config/containers/logging/syslog.md +++ b/config/containers/logging/syslog.md @@ -89,5 +89,6 @@ starting the container. | `tag` | A string that is appended to the `APP-NAME` in the `syslog` 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` | | `syslog-format` | The `syslog` message format to use. If not specified the local UNIX syslog format is used, without a specified hostname. Specify `rfc3164` for the RFC-3164 compatible format, `rfc5424` for RFC-5424 compatible format, or `rfc5424micro` for RFC-5424 compatible format with microsecond timestamp resolution. | `--log-opt syslog-format=rfc5424micro` | | `labels` | Applies when starting the Docker daemon. A comma-separated list of logging-related labels this daemon accepts. Used for advanced [log tag options](log_tags.md). | `--log-opt labels=production_status,geo` | +| `labels-regex` | Applies when starting the Docker daemon. Similar to and compatible with `labels`. A regular expression to match logging-related labels. Used for advanced [log tag options](log_tags.md). | `--log-opt labels-regex=^(production_status\|geo)` | | `env` | Applies when starting the Docker daemon. A comma-separated list of logging-related environment variables this daemon accepts. Used for advanced [log tag options](log_tags.md). | `--log-opt env=os,customer` | | `env-regex` | Applies when starting the Docker daemon. Similar to and compatible with `env`. A regular expression to match logging-related environment variables. Used for advanced [log tag options](log_tags.md). | `--log-opt env-regex=^(os\|customer)` |