From b10c3141c2688750ec542c0c358195e805431ac2 Mon Sep 17 00:00:00 2001 From: Hiroshi Hatake Date: Thu, 15 Feb 2024 12:54:58 +0900 Subject: [PATCH 1/5] in_tail: Add descriptions for use_extended_glob parameter Signed-off-by: Hiroshi Hatake --- input/tail.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/input/tail.md b/input/tail.md index 12f68f05..fcfac652 100644 --- a/input/tail.md +++ b/input/tail.md @@ -97,6 +97,8 @@ If the date is `20140401`, Fluentd starts to watch the files in `/path/to/2014/0 By default, You should not use `*` with log rotation because it may cause the log duplication. To avoid log duplication, you need to set `follow_inodes true` in the configuration. +If you want to use other glob patterns such as `[]` and `?`, you need to set up `use_extended_glob true` as described in the `use_extended_glob` section. + ### `path_timezone` | type | default | version | @@ -113,6 +115,15 @@ path_timezone "+00" For timezone format, see [Timezone Section](../configuration/format-section.md#time-parameters). +### `use_extended_glob` + +| type | default | version | +| :--- | :--- | :--- | +| bool | false | 1.17.0 | + +This parameter permits to extend glob patterns on `path` parameter. +When turning on, users can use `[]` and `?` in glob patterns. + ### `exclude_path` | type | default | version | From b512fbc96243e46eb66b483a8e07650cd7c2ae61 Mon Sep 17 00:00:00 2001 From: Hiroshi Hatake Date: Mon, 25 Mar 2024 20:30:44 +0900 Subject: [PATCH 2/5] in_tail: Apply the changes Signed-off-by: Hiroshi Hatake --- input/tail.md | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/input/tail.md b/input/tail.md index fcfac652..0a1727c9 100644 --- a/input/tail.md +++ b/input/tail.md @@ -97,7 +97,7 @@ If the date is `20140401`, Fluentd starts to watch the files in `/path/to/2014/0 By default, You should not use `*` with log rotation because it may cause the log duplication. To avoid log duplication, you need to set `follow_inodes true` in the configuration. -If you want to use other glob patterns such as `[]` and `?`, you need to set up `use_extended_glob true` as described in the `use_extended_glob` section. +If you want to use other glob patterns such as `[]` and `?`, you need to set up `enable_glob extended` as described in the `enable_glob` section. ### `path_timezone` @@ -115,14 +115,15 @@ path_timezone "+00" For timezone format, see [Timezone Section](../configuration/format-section.md#time-parameters). -### `use_extended_glob` +### `enable_glob` -| type | default | version | -| :--- | :--- | :--- | -| bool | false | 1.17.0 | +| type | default | available values | version | +| :--- | :--- | :--- |:--- | +| enum | with\_wildcards | with\_wildcards/extended/no | 1.17.0 | -This parameter permits to extend glob patterns on `path` parameter. -When turning on, users can use `[]` and `?` in glob patterns. +This parameter permits to extend glob patterns on `path` and `exclude_path` parameters. +When specifying `extended`, users can use `[]` and `?` in glob patterns. +Also, when specifying `no`, the glob patterns are disabled. ### `exclude_path` From 7377271f63efdf55d2666cb33657b14427eccf7f Mon Sep 17 00:00:00 2001 From: Hiroshi Hatake Date: Tue, 26 Mar 2024 14:15:21 +0900 Subject: [PATCH 3/5] in_tail: Follow the choices change Signed-off-by: Hiroshi Hatake --- input/tail.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/input/tail.md b/input/tail.md index 0a1727c9..186c75b3 100644 --- a/input/tail.md +++ b/input/tail.md @@ -119,11 +119,10 @@ For timezone format, see [Timezone Section](../configuration/format-section.md#t | type | default | available values | version | | :--- | :--- | :--- |:--- | -| enum | with\_wildcards | with\_wildcards/extended/no | 1.17.0 | +| enum | with\_wildcards | with\_wildcards/extended | 1.17.0 | This parameter permits to extend glob patterns on `path` and `exclude_path` parameters. When specifying `extended`, users can use `[]` and `?` in glob patterns. -Also, when specifying `no`, the glob patterns are disabled. ### `exclude_path` From 1070c86647efa246507c0fc1fb898fac6e75e121 Mon Sep 17 00:00:00 2001 From: Hiroshi Hatake Date: Tue, 26 Mar 2024 15:03:56 +0900 Subject: [PATCH 4/5] in_tail: Use always instead of extended Signed-off-by: Hiroshi Hatake --- input/tail.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/input/tail.md b/input/tail.md index 186c75b3..cc5a3ceb 100644 --- a/input/tail.md +++ b/input/tail.md @@ -119,10 +119,10 @@ For timezone format, see [Timezone Section](../configuration/format-section.md#t | type | default | available values | version | | :--- | :--- | :--- |:--- | -| enum | with\_wildcards | with\_wildcards/extended | 1.17.0 | +| enum | with\_wildcards | with\_wildcards/always | 1.17.0 | This parameter permits to extend glob patterns on `path` and `exclude_path` parameters. -When specifying `extended`, users can use `[]` and `?` in glob patterns. +When specifying `always`, users can use `[]` and `?` in glob patterns. ### `exclude_path` From cf19c875d560ccaadef6a3f366eeabe50d9cc4e1 Mon Sep 17 00:00:00 2001 From: Hiroshi Hatake Date: Tue, 26 Mar 2024 19:01:33 +0900 Subject: [PATCH 5/5] in_tail: Follow the plugin's code changes Signed-off-by: Hiroshi Hatake --- input/tail.md | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/input/tail.md b/input/tail.md index cc5a3ceb..402822d2 100644 --- a/input/tail.md +++ b/input/tail.md @@ -97,7 +97,7 @@ If the date is `20140401`, Fluentd starts to watch the files in `/path/to/2014/0 By default, You should not use `*` with log rotation because it may cause the log duplication. To avoid log duplication, you need to set `follow_inodes true` in the configuration. -If you want to use other glob patterns such as `[]` and `?`, you need to set up `enable_glob extended` as described in the `enable_glob` section. +If you want to use other glob patterns such as `[]` and `?`, you need to set up `glob_policy extended` as described in the `glob_policy` section. ### `path_timezone` @@ -115,14 +115,18 @@ path_timezone "+00" For timezone format, see [Timezone Section](../configuration/format-section.md#time-parameters). -### `enable_glob` +### `glob_policy` | type | default | available values | version | | :--- | :--- | :--- |:--- | -| enum | with\_wildcards | with\_wildcards/always | 1.17.0 | +| enum | backward\_compatible | backward\_compatible/extended/always | 1.17.0 | This parameter permits to extend glob patterns on `path` and `exclude_path` parameters. -When specifying `always`, users can use `[]` and `?` in glob patterns. +When specifying `extended`, users can use `[]` and `?` in glob patterns. +When specifying `always`, users can use `[]`, `?`, and additonally `{}` in glob patterns. + +However, `always` option is not able to use with the default value of `path_delimiter`. +When using the default value of `path_delimiter`, it will be marked as `Fluent::ConfigError`. ### `exclude_path`