Skip to content

Commit 656bb14

Browse files
authored
out_file: add example explanation (#603)
Signed-off-by: sai-lens <rcp655317@gmail.com>
1 parent 9b00378 commit 656bb14

File tree

1 file changed

+30
-29
lines changed

1 file changed

+30
-29
lines changed

output/file.md

Lines changed: 30 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,17 @@ It is included in Fluentd's core.
2323
</match>
2424
```
2525

26+
With this configuration, files named `/var/log/fluent/myapp.{%Y%m%d}.log.gz` will be generated at one-day intervals.
27+
2628
Please see the [Configuration File](../configuration/config-file.md) article for the basic structure and syntax of the configuration file.
2729

2830
For `<buffer>`, refer to [`<buffer>` Section](#less-than-buffer-greater-than-section).
2931

3032
## Plugin Helpers
3133

32-
* [`formatter`](../plugin-helper-overview/api-plugin-helper-formatter.md)
33-
* [`inject`](../plugin-helper-overview/api-plugin-helper-inject.md)
34-
* [`compat_parameters`](../plugin-helper-overview/api-plugin-helper-compat_parameters.md)
34+
- [`formatter`](../plugin-helper-overview/api-plugin-helper-formatter.md)
35+
- [`inject`](../plugin-helper-overview/api-plugin-helper-inject.md)
36+
- [`compat_parameters`](../plugin-helper-overview/api-plugin-helper-compat_parameters.md)
3537

3638
## Parameters
3739

@@ -43,9 +45,9 @@ The value must be `file`.
4345

4446
### `path`
4547

46-
| type | default | version |
47-
| :--- | :--- | :--- |
48-
| string | required parameter | 0.14.0 |
48+
| type | default | version |
49+
| :----- | :----------------- | :------ |
50+
| string | required parameter | 0.14.0 |
4951

5052
The path of the file. The actual path is path + time + ".log" by default. The `path` parameter supports placeholders, so you can embed `time`, `tag` and `record` fields in the path.
5153

@@ -67,8 +69,8 @@ Initially, you may see a file which looks like `/path/to/file.%Y%m%d/buffer.b569
6769
### `append`
6870

6971
| type | default | version |
70-
| :--- | :--- | :--- |
71-
| bool | false | 0.14.0 |
72+
| :--- | :------ | :------ |
73+
| bool | false | 0.14.0 |
7274

7375
Determines whether the flushed chunk is appended to an existing file or not. The default is not appended. By default, `out_file` flushes each chunk to a different path.
7476

@@ -118,25 +120,25 @@ See [Buffer Section Configurations](../configuration/buffer-section.md) for more
118120

119121
#### `@type`
120122

121-
| type | default | version |
122-
| :--- | :--- | :--- |
123-
| string | file | 0.14.9 |
123+
| type | default | version |
124+
| :----- | :------ | :------ |
125+
| string | file | 0.14.9 |
124126

125127
Overwrites the default value in this plugin.
126128

127129
#### `chunk_keys`
128130

129-
| type | default | version |
130-
| :--- | :--- | :--- |
131-
| array | time | 0.14.9 |
131+
| type | default | version |
132+
| :---- | :------ | :------ |
133+
| array | time | 0.14.9 |
132134

133135
Overwrites the default value in this plugin.
134136

135137
#### `timekey`
136138

137139
| type | default | version |
138-
| :--- | :--- | :--- |
139-
| time | 86400 | 0.14.9 |
140+
| :--- | :------ | :------ |
141+
| time | 86400 | 0.14.9 |
140142

141143
Overwrites the default value in this plugin.
142144

@@ -147,23 +149,23 @@ Deprecated parameter. Use `timekey_use_utc` in `<buffer>` instead.
147149
### `add_path_suffix`
148150

149151
| type | default | version |
150-
| :--- | :--- | :--- |
151-
| bool | true | 0.14.9 |
152+
| :--- | :------ | :------ |
153+
| bool | true | 0.14.9 |
152154

153155
Add path suffix or not. See also the `path_suffix` parameter.
154156

155157
### `path_suffix`
156158

157-
| type | default | version |
158-
| :--- | :--- | :--- |
159-
| string | ".log" | 0.14.9 |
159+
| type | default | version |
160+
| :----- | :------ | :------ |
161+
| string | ".log" | 0.14.9 |
160162

161163
The suffix for output result.
162164

163165
### `compress`
164166

165167
| type | default |
166-
| :--- | :--- |
168+
| :--- | :------ |
167169
| enum | text |
168170

169171
Compresses flushed files.
@@ -172,10 +174,10 @@ No compression is performed by default.
172174

173175
Supported values:
174176

175-
* `text`
176-
* `gz`
177-
* `gzip`
178-
* `zstd` (since v1.19.0)
177+
- `text`
178+
- `gz`
179+
- `gzip`
180+
- `zstd` (since v1.19.0)
179181

180182
### `recompress`
181183

@@ -206,8 +208,8 @@ Please see the [logging](../deployment/logging.md) article for further details.
206208

207209
For common output / buffer parameters, please check the following articles:
208210

209-
* [Output Plugin Overview](./)
210-
* [Buffer Section Configuration](../configuration/buffer-section.md)
211+
- [Output Plugin Overview](./)
212+
- [Buffer Section Configuration](../configuration/buffer-section.md)
211213

212214
## FAQ
213215

@@ -278,4 +280,3 @@ $ tree /tmp/logs/
278280
```
279281

280282
If this article is incorrect or outdated, or omits critical information, please [let us know](https://github.com/fluent/fluentd-docs-gitbook/issues?state=open). [Fluentd](http://www.fluentd.org/) is an open-source project under [Cloud Native Computing Foundation \(CNCF\)](https://cncf.io/). All components are available under the Apache 2 License.
281-

0 commit comments

Comments
 (0)