Skip to content
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

system_config: add path attribute in system/log section #516

Merged
merged 6 commits into from
Dec 2, 2024
Merged
Show file tree
Hide file tree
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
20 changes: 17 additions & 3 deletions deployment/logging.md
Original file line number Diff line number Diff line change
Expand Up @@ -148,13 +148,27 @@ end

## Output to Log File

### By Command Line Option

By default, Fluentd outputs to the standard output. Use `-o` command line option to specify the file instead:

```text
$ fluentd -o /path/to/log_file
```

### Log Rotation Setting
### By Config File

Since v1.18.0, You can also configure the log file path using the `<log>` directive under `<system>`:

```text
<system>
<log>
path /path/to/log_file
</log>
</system>
```

## Log Rotation Setting

By default, Fluentd does not rotate log files. You can configure this behavior via system-config after v1.13.0.

Expand All @@ -176,7 +190,7 @@ Actually, an external library manages these default values, resulting in this co

You can use command-line options too (mainly for before v1.13.0):

#### `--log-rotate-age AGE`
### `--log-rotate-age AGE`

`AGE` is an integer or a string:

Expand All @@ -185,7 +199,7 @@ You can use command-line options too (mainly for before v1.13.0):

NOTE: When `--log-rotate-age` is specified on Windows, log files are separated into `log-supervisor-0.log`, `log-0.log`, ..., `log-N.log` where `N` is `generation - 1` due to the system limitation. Windows does not permit delete and rename files simultaneously owned by another process.

#### `--log-rotate-size BYTES`
### `--log-rotate-size BYTES`

The byte size to rotate log files. This is applied when `--log-rotate-age` is specified with integer:

Expand Down
10 changes: 10 additions & 0 deletions deployment/system-config.md
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,16 @@ Enable JIT for worker processes. Internally, this configuration enables Ruby's `

### `<log>` section

#### `path`

| type | default | version |
| :--- | :--- | :--- |
| string | nil | 1.18.0 |

Specifies the log file path.
Watson1978 marked this conversation as resolved.
Show resolved Hide resolved

Please see also [Output to Log File](logging.md#output-to-log-file).

#### `format`

| type | default | version |
Expand Down