Skip to content

Commit 9985bb5

Browse files
daipomkenhys
andauthored
system-config: add option forced_stacktrace_level (#589)
* system-config: add option forced_stacktrace_level fluent/fluentd#5008 Signed-off-by: Daijiro Fukuda <fukuda@clear-code.com> * Update deployment/system-config.md Signed-off-by: Daijiro Fukuda <fukuda@clear-code.com> Co-authored-by: Kentaro Hayashi <kenhys@gmail.com> --------- Signed-off-by: Daijiro Fukuda <fukuda@clear-code.com> Co-authored-by: Kentaro Hayashi <kenhys@gmail.com>
1 parent 9fd28f3 commit 9985bb5

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
@@ -271,6 +271,37 @@ NOTE: When enabling log rotation on Windows, log files are separated into `log-s
271271

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

274+
#### `forced_stacktrace_level`
275+
276+
| type | default | version |
277+
| :--- | :--- | :--- |
278+
| enum | "none" | 1.19.0 |
279+
280+
Specifies `none` or the log level e.g. `trace`, `debug`, `info`, `warn`, `error`, or `fatal`.
281+
282+
If you set a log level for `forced_stacktrace_level`, log levels of stacktraces are forced to that level.
283+
284+
Example:
285+
286+
```
287+
<system>
288+
log_level info # This is the default. You can omit this.
289+
<log>
290+
forced_stacktrace_level info
291+
</log>
292+
</system>
293+
```
294+
295+
This setting results in the following behavior:
296+
297+
* All stacktraces initially with `info` level (`log_level`) or higher will be forcibly logged with `info` level (`forced_stacktrace_level`).
298+
299+
Note that stacktraces that do not meet `log_level` are discarded in advance.
300+
Thanks to this, there's no concern that `trace` or `debug`-level stacktraces being excessively output as `info`-level logs.
301+
302+
You can use this option to exclude all stacktraces from an alerting system if monitoring Fluentd's log files directly.
303+
(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.)
304+
274305
### `<source_only_buffer>` section
275306

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

0 commit comments

Comments
 (0)