From 48f0a6a9afcb7c430497b43f40032a7a606f89b4 Mon Sep 17 00:00:00 2001 From: en-jin19 Date: Wed, 1 Sep 2021 16:09:20 +0200 Subject: [PATCH 1/2] TiKV config: add 7 log-related congifurations --- tikv-configuration-file.md | 44 +++++++++++++++++++++++++++++++++++--- 1 file changed, 41 insertions(+), 3 deletions(-) diff --git a/tikv-configuration-file.md b/tikv-configuration-file.md index 07ca1819b3245..93f4dafa8a28c 100644 --- a/tikv-configuration-file.md +++ b/tikv-configuration-file.md @@ -13,7 +13,7 @@ This document only describes the parameters that are not included in command-lin ## Global configuration -### abort-on-panic +### `abort-on-panic` + Sets whether to call `abort()` to exit the process when TiKV panics. This option affects whether TiKV allows the system to generate core dump files. @@ -22,7 +22,45 @@ This document only describes the parameters that are not included in command-lin + Default value: `false` -### server +### `log-level` + ++ The log level ++ Available values: "trace", "debug", "info", "warning", "error", "critical" ++ Default value: "info" + +### `log-file` + ++ The log file. If this parameter is not set, logs are written to "stderr" by default. ++ Default value: "" + +### `log-format` + ++ The log format ++ Available values: "json", "text" ++ Default value: "text" + +### `log-rotation-timespan` + ++ The timespan between log rotation. When this timespan passes, log files are rotated, that is, a timestamp is appended to the file name of the current log file, and a new file is created. ++ Default value: "24h" + +### `log-rotation-size` + ++ The size of a log file that triggers log rotation. Once the size of a log file is bigger than the specified threshold value, log files are rotated. The old log file is placed into the new file, and the new filename is the old filename with a timestamp suffix. ++ Default value: "300MB" + +### `slow-log-file` + ++ The file to store slow logs ++ If this parameter is not set but `log-file` is set, slow logs are written to the log file that specified in `log-file`. If both `slow-log-file` and `log-file` are not set, all logs are output to "stderr". ++ Default value: "" + +### `slow-log-threshold` + ++ The threshold to print slow logs. If the process time is longer than this threshold, the slow logs are printed. ++ Default value: "1s" + +## server + Configuration items related to the server @@ -115,7 +153,7 @@ This document only describes the parameters that are not included in command-lin ### `end-point-slow-log-threshold` -+ The time threshold for a TiDB's push down request to print slow log ++ The time threshold for a TiDB's push down request to print slow log. If the process time is longer than this threshold, the slow logs are printed. + Default value: `"1s"` + Minimum value: `0` From 8e93b1aa38fa1fdb8c63ff03394a52c9f037be82 Mon Sep 17 00:00:00 2001 From: Enwei Date: Fri, 10 Sep 2021 10:48:03 +0200 Subject: [PATCH 2/2] Apply suggestions from code review Co-authored-by: TomShawn <41534398+TomShawn@users.noreply.github.com> --- tikv-configuration-file.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/tikv-configuration-file.md b/tikv-configuration-file.md index 93f4dafa8a28c..b924a53892df5 100644 --- a/tikv-configuration-file.md +++ b/tikv-configuration-file.md @@ -25,39 +25,39 @@ This document only describes the parameters that are not included in command-lin ### `log-level` + The log level -+ Available values: "trace", "debug", "info", "warning", "error", "critical" ++ Value options: "trace", "debug", "info", "warning", "error", "critical" + Default value: "info" ### `log-file` -+ The log file. If this parameter is not set, logs are written to "stderr" by default. ++ The log file. If this configuration is not set, logs are output to "stderr" by default. + Default value: "" ### `log-format` + The log format -+ Available values: "json", "text" ++ Value options: "json", "text" + Default value: "text" ### `log-rotation-timespan` -+ The timespan between log rotation. When this timespan passes, log files are rotated, that is, a timestamp is appended to the file name of the current log file, and a new file is created. ++ The timespan between log rotations. When this timespan passes, log files are rotated, that is, a timestamp is appended to the file name of the current log file, and a new file is created. + Default value: "24h" ### `log-rotation-size` -+ The size of a log file that triggers log rotation. Once the size of a log file is bigger than the specified threshold value, log files are rotated. The old log file is placed into the new file, and the new filename is the old filename with a timestamp suffix. ++ The size of a log file that triggers log rotation. Once the size of a log file is bigger than the specified threshold value, log files are rotated. The old log file is placed into the new file, and the new file name is the old file name with a timestamp suffix. + Default value: "300MB" ### `slow-log-file` + The file to store slow logs -+ If this parameter is not set but `log-file` is set, slow logs are written to the log file that specified in `log-file`. If both `slow-log-file` and `log-file` are not set, all logs are output to "stderr". ++ If this configuration is not set but `log-file` is set, slow logs are output to the log file specified by `log-file`. If neither `slow-log-file` nor `log-file` are set, all logs are output to "stderr". + Default value: "" ### `slow-log-threshold` -+ The threshold to print slow logs. If the process time is longer than this threshold, the slow logs are printed. ++ The threshold for outputing slow logs. If the processing time is longer than this threshold, slow logs are output. + Default value: "1s" ## server @@ -153,7 +153,7 @@ This document only describes the parameters that are not included in command-lin ### `end-point-slow-log-threshold` -+ The time threshold for a TiDB's push down request to print slow log. If the process time is longer than this threshold, the slow logs are printed. ++ The time threshold for a TiDB's push-down request to output slow log. If the processing time is longer than this threshold, the slow logs are output. + Default value: `"1s"` + Minimum value: `0`