Skip to content

Commit edaf9a8

Browse files
authored
Merge pull request #379 from fluent/read_from_head-v1.14.3
in_tail: Update description about `read_from_head` to follow v1.14.3 or later
2 parents 92649e6 + 99b9aa3 commit edaf9a8

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

input/tail.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ exclude_path ["/path/to/*.gz", "/path/to/*.zip"]
136136
| :--- | :--- | :--- |
137137
| bool | false | 1.12.0 |
138138

139-
Enable combination of `*` in path with rotation inside same directory and `read_from_head true`.
139+
Avoid to read rotated files duplicately. You should set `true` when you use `*` or `strftime` format in `path`.
140140

141141
```text
142142
path /path/to/*
@@ -176,9 +176,11 @@ Skips the refresh of the watch list on startup. This reduces the startup time wh
176176

177177
Starts to read the logs from the head of the file or the last read position recorded in `pos_file`, not tail.
178178

179-
If you use `*` or `strftime` format as `path` and new files may be added into such paths while tailing, you should set this parameter to `true`. Otherwise some logs in newly added files may be lost. On the other hand you should guarantee that the log rotation will not occur in `*` directory in that case to avoid log duplication. Or you can use `follow_inodes true` to avoid such log duplication, which is available as of v1.12.0.
179+
Notes:
180180

181-
Note that `in_tail` tries to read a file during the startup phase when this is `true`. So that if the target file is too large and takes a long time to read it, other plugins are blocked to start until the reading is finished. You can avoid it by `skip_refresh_on_startup`.
181+
* `in_tail` tries to read a file during the startup phase when this is `true`. So that if the target file is too large and takes a long time to read it, other plugins are blocked to start until the reading is finished. You can avoid it by `skip_refresh_on_startup`.
182+
* **For Fluentd <= v1.14.2**: If you use `*` or `strftime` format as `path` and new files may be added into such paths while tailing, you should set this parameter to `true`. Otherwise some logs in newly added files may be lost. On the other hand you should guarantee that the log rotation will not occur in `*` directory in that case to avoid log duplication. Or you can use `follow_inodes true` to avoid such log duplication, which is available as of v1.12.0.
183+
* From Fluentd v1.14.3, `in_tail` reads newly added files from head automatically even if `read_from_head` is `false`. `read_from_head false` is affected only on start up.
182184

183185
### `encoding`, `from_encoding`
184186

0 commit comments

Comments
 (0)