Skip to content
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
6 changes: 6 additions & 0 deletions command-line-flags-for-tidb-configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,12 @@ When you start the TiDB cluster, you can use command-line options or environment
- Default: `""`
- If this option is not set, logs are output to "stderr". If this option is set, logs are output to the corresponding file.

## `--log-general`

+ The filename of the [General Log](/system-variables.md#tidb_general_log)
+ Default: `""`
+ If this option is not set, the general log is written to the file specified by [`--log-file`](#--log-file) by default.

## `--log-slow-query`

- The directory for the slow query log
Expand Down
13 changes: 13 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 filename of the [general log](/system-variables.md#tidb_general_log).
+ Default value: `""`
+ If you specify a filename, the general log is written to this specified file. If the value is blank, the general log is written to the server log of the TiDB instance. You can specify the name of the server log using [`filename`](#filename).

### `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,13 @@ 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.

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

+ The compression method for the log.
+ Default value: `""`
+ Value options: `""`, `"gzip"`
+ The default value is `""`, which means no compression. To enable the gzip compression, set this value to `"gzip"`. After compression is enabled, all log files are affected, such as [`slow-query-file`](#slow-query-file) and [`general-log-file`](#general-log-file-new-in-v800).

## Security

Configuration items related to security.
Expand Down