docs: add tidb_general_log to TiDB configuration reference - #21960
doc-claw-bot wants to merge 3 commits into
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
📝 WalkthroughWalkthrough文档新增 ChangesTiDB 通用日志配置文档
Priority: ⬇️ Low Estimated code review effort: 1 (Trivial) | ~3 minutes Change: Other Suggested reviewers: Merge Risk: 🔵 Low · up to Operators may mistakenly think statements that fail during execution will not appear in the general log. Correcting the description is a small documentation change; runtime behavior is unaffected. Architecture SummaryArchitecture risk: 🔵 Low · up to The change affects 1 system. Changed systems: Architecture concerns Review detailsSystems and components
Before / after behavior
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository: pingcap/docs-cn/.coderabbit.yaml
Review profile: ASSERTIVE
Plan: Advanced
Run ID: 8749b8fb-d48f-46cb-8664-09d9102be30d
📒 Files selected for processing (1)
tidb-configuration-file.md
Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 3 remain after this review.
There was a problem hiding this comment.
Actionable comments posted: 1
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository: pingcap/docs-cn/.coderabbit.yaml
Review profile: ASSERTIVE
Plan: Advanced
Run ID: 13ee478a-4256-4bae-a7ce-5a0440ad6b2f
📒 Files selected for processing (1)
tidb-configuration-file.md
Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 1 remain after this review.
| ### `tidb_general_log` | ||
|
|
||
| + 用于控制是否在 TiDB 日志中记录成功执行的 SQL 语句。要查看这些记录,请将 [`log.level`](#level) 设置为 `"info"` 或 `"debug"`。 | ||
| + 该配置项对应系统变量 [`tidb_general_log`](/system-variables.md#tidb_general_log)。配置文件用于设置当前 TiDB 实例启动时的值,而系统变量可用于动态修改当前 TiDB 实例上的该设置。 | ||
| + 默认值:`false` | ||
| + 可选值:`true` 或 `false` | ||
|
|
There was a problem hiding this comment.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
请改为描述“通过编译并进入执行阶段”的 SQL。
logStmt 在执行前调用。因此,已通过编译但执行时报错的 SQL 也会记录。只有编译错误会在调用 logStmt 前返回。当前“成功执行”会排除执行失败的 SQL,导致文档描述不准确。
Suggested fix
-用于控制是否在 TiDB 日志中记录成功执行的 SQL 语句。
+用于控制是否在 TiDB 日志中记录通过编译并进入执行阶段的 SQL 语句。📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| ### `tidb_general_log` | |
| + 用于控制是否在 TiDB 日志中记录成功执行的 SQL 语句。要查看这些记录,请将 [`log.level`](#level) 设置为 `"info"` 或 `"debug"`。 | |
| + 该配置项对应系统变量 [`tidb_general_log`](/system-variables.md#tidb_general_log)。配置文件用于设置当前 TiDB 实例启动时的值,而系统变量可用于动态修改当前 TiDB 实例上的该设置。 | |
| + 默认值:`false` | |
| + 可选值:`true` 或 `false` | |
| ### `tidb_general_log` | |
| 用于控制是否在 TiDB 日志中记录通过编译并进入执行阶段的 SQL 语句。要查看这些记录,请将 [`log.level`](#level) 设置为 `"info"` 或 `"debug"`。 | |
| 该配置项对应系统变量 [`tidb_general_log`](/system-variables.md#tidb_general_log)。配置文件用于设置当前 TiDB 实例启动时的值,而系统变量可用于动态修改当前 TiDB 实例上的该设置。 | |
| 默认值:`false` | |
| 可选值:`true` 或 `false` | |
What is changed, added or deleted? (Required)
instance.tidb_general_logentry totidb-configuration-file.md.Which TiDB version(s) do your changes apply to? (Required)
Tips for choosing the affected version(s):
By default, CHOOSE MASTER ONLY so your changes will be applied to the next TiDB major or minor releases. If your PR involves a product feature behavior change or a compatibility change, CHOOSE THE AFFECTED RELEASE BRANCH(ES) AND MASTER.
For details, see tips for choosing the affected versions (in Chinese).
What is the related PR or file link(s)?
AI agent involvement
Do your changes match any of the following descriptions?
Summary by CodeRabbit
instance.tidb_general_log配置项,可控制是否在 TiDB 日志中记录成功执行的 SQL 语句。默认关闭;启用后,需将日志级别设为info或debug才能查看记录。tidb_general_log可动态修改当前实例的设置。可选值为true或false。