-
Notifications
You must be signed in to change notification settings - Fork 5.9k
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 doesn't log any slow log if log.level >= "error" #30309
Comments
Introduced by #23534 which uses the same config of the server logger to initialize the slow query logger: The slow query logger uses default config before https://github.com/pingcap/tidb/pull/23534/files#diff-163bbfde1f383898e507b5ca82bd6bec58809a82f6b8352d991f50962f7f472aL277-L285 and it uses Lines 1028 to 1031 in e97e8c0
|
We can use the default value of level to init the slow query logger here: tidb/util/logutil/slow_query_logger.go Line 34 in dfd7157
Slow query logger can always use Lines 1028 to 1031 in dfd7157
If so, we can add a test case here to check the level of slow query logger is always less than warn level: Line 117 in dfd7157
|
Please check whether the issue should be labeled with 'affects-x.y' or 'fixes-x.y.z', and then remove 'needs-more-info' label. |
Bug Report
Please answer these questions before submitting your issue. Thanks!
1. Minimal reproduce step (Required)
tidb_slow_query.log
file.2. What did you expect to see? (Required)
slow logs show.
3. What did you see instead (Required)
No slow logs.
4. What is your TiDB version? (Required)
[v5.1-v5.3], nightly
The text was updated successfully, but these errors were encountered: