From 5695cfef31c9e11b13568df65b2a8245cc7cc15b Mon Sep 17 00:00:00 2001 From: xixirangrang <35301108+hfxsd@users.noreply.github.com> Date: Fri, 1 Mar 2024 15:12:35 +0800 Subject: [PATCH 1/7] Update tidb-configuration-file.md --- tidb-configuration-file.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/tidb-configuration-file.md b/tidb-configuration-file.md index 35ec304fd08a3..09e6d7105d0ee 100644 --- a/tidb-configuration-file.md +++ b/tidb-configuration-file.md @@ -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` New in v8.0.0 + ++ The file name of the [general log](/system-variables.md#tidb_general_log). ++ Default value: "" ++ If you set file name, the general log is output to this file. If the value is empty, the general log is output to the file specified by [`filename`](#filename) on the TiDB server. + ### `timeout` New in v7.1.0 - 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. @@ -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` New in v8.0.0 + ++ The compression method for the log. ++ Default value: "" ++ 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`. + ## Security Configuration items related to security. From 7605aa32358315592a92ce83e0198b1dbd0c31f6 Mon Sep 17 00:00:00 2001 From: xixirangrang Date: Fri, 1 Mar 2024 15:52:24 +0800 Subject: [PATCH 2/7] Update tidb-configuration-file.md --- tidb-configuration-file.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tidb-configuration-file.md b/tidb-configuration-file.md index 09e6d7105d0ee..39508f007aaef 100644 --- a/tidb-configuration-file.md +++ b/tidb-configuration-file.md @@ -323,7 +323,7 @@ Configuration items related to log. + The file name of the [general log](/system-variables.md#tidb_general_log). + Default value: "" -+ If you set file name, the general log is output to this file. If the value is empty, the general log is output to the file specified by [`filename`](#filename) on the TiDB server. ++ If you specify a file name, the general log is output to this file. If the value is empty, the general log is output to the file specified by [`filename`](#filename) on the TiDB server. ### `timeout` New in v7.1.0 From 5addfb3db2e2e71301280e7c8bca4c45a1b156f0 Mon Sep 17 00:00:00 2001 From: xixirangrang Date: Mon, 4 Mar 2024 10:47:12 +0800 Subject: [PATCH 3/7] Update tidb-configuration-file.md Co-authored-by: Roger Song --- tidb-configuration-file.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tidb-configuration-file.md b/tidb-configuration-file.md index 39508f007aaef..37cdaf24b717b 100644 --- a/tidb-configuration-file.md +++ b/tidb-configuration-file.md @@ -323,7 +323,7 @@ Configuration items related to log. + The file name of the [general log](/system-variables.md#tidb_general_log). + Default value: "" -+ If you specify a file name, the general log is output to this file. If the value is empty, the general log is output to the file specified by [`filename`](#filename) on the TiDB server. ++ 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). ### `timeout` New in v7.1.0 From 2ef61a7721179d97b40b5bab34e971e39e9bf418 Mon Sep 17 00:00:00 2001 From: Hangjie Mo Date: Thu, 14 Mar 2024 10:41:22 +0800 Subject: [PATCH 4/7] Update tidb-configuration-file.md --- tidb-configuration-file.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tidb-configuration-file.md b/tidb-configuration-file.md index 37cdaf24b717b..74469c1ae47ba 100644 --- a/tidb-configuration-file.md +++ b/tidb-configuration-file.md @@ -361,7 +361,7 @@ 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` New in v8.0.0 +#### `compression` New in v8.0.0 + The compression method for the log. + Default value: "" From c68495e92974c91adad5ceba03e8a402af7f10c8 Mon Sep 17 00:00:00 2001 From: xixirangrang Date: Fri, 15 Mar 2024 10:10:50 +0800 Subject: [PATCH 5/7] Apply suggestions from code review Co-authored-by: Aolin --- tidb-configuration-file.md | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/tidb-configuration-file.md b/tidb-configuration-file.md index 74469c1ae47ba..9884ba4ccf3cf 100644 --- a/tidb-configuration-file.md +++ b/tidb-configuration-file.md @@ -321,9 +321,9 @@ Configuration items related to log. ### `general-log-file` New in v8.0.0 -+ The file name of the [general log](/system-variables.md#tidb_general_log). -+ Default value: "" -+ 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). ++ 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` New in v7.1.0 @@ -364,8 +364,9 @@ Configuration items related to log files. #### `compression` New in v8.0.0 + The compression method for the log. -+ Default value: "" -+ 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`. ++ 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). ## Security From 85e6ee8933d6cb074983dc635145347784f35bb0 Mon Sep 17 00:00:00 2001 From: xixirangrang <35301108+hfxsd@users.noreply.github.com> Date: Fri, 15 Mar 2024 10:28:19 +0800 Subject: [PATCH 6/7] add --log-general --- command-line-flags-for-tidb-configuration.md | 6 ++++++ tidb-configuration-file.md | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/command-line-flags-for-tidb-configuration.md b/command-line-flags-for-tidb-configuration.md index e4b5b936f2e7e..26278c403b6f5 100644 --- a/command-line-flags-for-tidb-configuration.md +++ b/command-line-flags-for-tidb-configuration.md @@ -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 output to the file specified by `--log-file` by default. + ## `--log-slow-query` - The directory for the slow query log diff --git a/tidb-configuration-file.md b/tidb-configuration-file.md index 9884ba4ccf3cf..129be3b5f0179 100644 --- a/tidb-configuration-file.md +++ b/tidb-configuration-file.md @@ -366,7 +366,7 @@ Configuration items related to log files. + 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). ++ 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 From 3ea4fce8a3dbc56e48b94134066e84df941fe983 Mon Sep 17 00:00:00 2001 From: xixirangrang Date: Fri, 15 Mar 2024 15:25:52 +0800 Subject: [PATCH 7/7] Update command-line-flags-for-tidb-configuration.md Co-authored-by: Aolin --- command-line-flags-for-tidb-configuration.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/command-line-flags-for-tidb-configuration.md b/command-line-flags-for-tidb-configuration.md index 26278c403b6f5..1981b1c94f778 100644 --- a/command-line-flags-for-tidb-configuration.md +++ b/command-line-flags-for-tidb-configuration.md @@ -83,7 +83,7 @@ When you start the TiDB cluster, you can use command-line options or environment + The filename of the [General Log](/system-variables.md#tidb_general_log) + Default: `""` -+ If this option is not set, the general log is output to the file specified by `--log-file` by 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`