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

tidb: add general-log-file and compression #16663

Merged
merged 7 commits into from
Mar 19, 2024
Merged
Changes from 3 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
12 changes: 12 additions & 0 deletions tidb-configuration-file.md
Original file line number Diff line number Diff line change
Expand Up @@ -319,6 +319,12 @@ Configuration items related to log.
- Default value: `10000`
- When the number of query rows (including the intermediate results based on statistics) is larger than this value, it is an `expensive` operation and outputs log with the `[EXPENSIVE_QUERY]` prefix.

### `general-log-file` <span class="version-mark">New in v8.0.0</span>

+ The file name of the [general log](/system-variables.md#tidb_general_log).
hfxsd marked this conversation as resolved.
Show resolved Hide resolved
+ Default value: ""
hfxsd marked this conversation as resolved.
Show resolved Hide resolved
+ If you specify a file name, the general log is written to this particular file. If the value is blank, the general log is written to the server log of the TiDB instance. The name of server log is specified by [`filename`](#filename).
hfxsd marked this conversation as resolved.
Show resolved Hide resolved

### `timeout` <span class="version-mark">New in v7.1.0</span>

- Sets the timeout for log-writing operations in TiDB. In case of a disk failure that prevents logs from being written, this configuration item can trigger the TiDB process to panic instead of hang.
Expand Down Expand Up @@ -355,6 +361,12 @@ Configuration items related to log files.
- Default value: `0`
- All the log files are retained by default. If you set it to `7`, seven log files are retained at maximum.

#### `compress` <span class="version-mark">New in v8.0.0</span>
Defined2014 marked this conversation as resolved.
Show resolved Hide resolved

+ The compression method for the log.
+ Default value: ""
hfxsd marked this conversation as resolved.
Show resolved Hide resolved
+ By default, compression is not enabled. Currently, the only supported compression format is `"gzip"`. After compression is enabled, all log files are affected, such as `slow-log-file` and `general-log-file`.
hfxsd marked this conversation as resolved.
Show resolved Hide resolved

## Security

Configuration items related to security.
Expand Down
Loading