Skip to content

Commit 4f9177d

Browse files
committed
system-config: add option forced_stacktrace_level
fluent/fluentd#5008 Signed-off-by: Daijiro Fukuda <[email protected]>
1 parent 188e817 commit 4f9177d

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed

deployment/system-config.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -259,6 +259,37 @@ NOTE: When enabling log rotation on Windows, log files are separated into `log-s
259259

260260
Please see also [Log Rotation Setting](logging.md#log-rotation-setting).
261261

262+
#### `forced_stacktrace_level`
263+
264+
| type | default | version |
265+
| :--- | :--- | :--- |
266+
| enum | "none" | 1.19.0 |
267+
268+
Specifies `none` or the log level e.g. `trace`, `debug`, `info`, `warn`, `error`, or `fatal`.
269+
270+
If you set a log level, log levels of stacktraces are forced to that level.
271+
272+
Example:
273+
274+
```
275+
<system>
276+
log_level info # This is the default. You can omit this.
277+
<log>
278+
forced_stacktrace_level info
279+
</log>
280+
</system>
281+
```
282+
283+
This setting results in the following behavior:
284+
285+
* All stacktraces initially with `info` level (`log_level`) or higher will be forcibly logged with `info` level (`forced_stacktrace_level`).
286+
287+
Note that stacktraces that do not meet `log_level` are discarded in advance.
288+
Thanks to this, there's no concern that `trace` or `debug`-level stacktraces being excessively output as `info`-level logs.
289+
290+
You can use this option to exclude all stacktraces from an alerting system if monitoring Fluentd's log files directly.
291+
(You don't need this feature if using [@FLUENT_LOG](logging.md#capture-fluentd-logs) because stacktraces are not routed into the `@FLUENT_LOG` label.)
292+
262293
### `<source_only_buffer>` section
263294

264295
The temporary buffer setting for [Source Only Mode](source-only-mode.md).

0 commit comments

Comments
 (0)