Skip to content

system-config: add option forced_stacktrace_level #589

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: 1.0
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions deployment/system-config.md
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,37 @@ NOTE: When enabling log rotation on Windows, log files are separated into `log-s

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

#### `forced_stacktrace_level`

| type | default | version |
| :--- | :--- | :--- |
| enum | "none" | 1.19.0 |

Specifies `none` or the log level e.g. `trace`, `debug`, `info`, `warn`, `error`, or `fatal`.

If you set a log level for `forced_stacktrace_level`, log levels of stacktraces are forced to that level.

Example:

```
<system>
log_level info # This is the default. You can omit this.
<log>
forced_stacktrace_level info
</log>
</system>
```

This setting results in the following behavior:

* All stacktraces initially with `info` level (`log_level`) or higher will be forcibly logged with `info` level (`forced_stacktrace_level`).

Note that stacktraces that do not meet `log_level` are discarded in advance.
Thanks to this, there's no concern that `trace` or `debug`-level stacktraces being excessively output as `info`-level logs.

You can use this option to exclude all stacktraces from an alerting system if monitoring Fluentd's log files directly.
(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.)

### `<source_only_buffer>` section

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