Skip to content
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

logutil: force level of slow logger to "debug" #28688

Closed
wants to merge 4 commits into from

Conversation

SabaPing
Copy link
Contributor

@SabaPing SabaPing commented Oct 9, 2021

What problem does this PR solve?

Fix oncall issue https://internal.pingcap.net/jira/browse/ONCALL-3746.

Setting TiDB's log.level to error causes that the slow log does not print.
One must set the log.level to info or warn via tiup cluster edit-config and reload the TiDB node to re-enable the slow logs.

This PR fix this issue. After fixing, global log.level should not affects slow logs.

Manual test steps

Start TiDB with command line arguement -L=error.

Slow logs should output normally.

Release note

Fix an error that cause slow log missing when the log level is set to `error` or `fatal`.

@ti-chi-bot
Copy link
Member

ti-chi-bot commented Oct 9, 2021

[REVIEW NOTIFICATION]

This pull request has been approved by:

  • breeswish
  • crazycs520

To complete the pull request process, please ask the reviewers in the list to review by filling /cc @reviewer in the comment.
After your PR has acquired the required number of LGTMs, you can assign this pull request to the committer in the list by filling /assign @committer in the comment to help you merge this pull request.

The full list of commands accepted by this bot can be found here.

Reviewer can indicate their review by submitting an approval review.
Reviewer can cancel approval by submitting a request changes review.

@ti-chi-bot ti-chi-bot added release-note Denotes a PR that will be considered when it comes time to generate release notes. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. release-note-none Denotes a PR that doesn't merit a release note. and removed release-note Denotes a PR that will be considered when it comes time to generate release notes. labels Oct 9, 2021
Copy link
Contributor

@crazycs520 crazycs520 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ti-chi-bot ti-chi-bot added the status/LGT1 Indicates that a PR has LGTM 1. label Oct 11, 2021
@ti-chi-bot ti-chi-bot added status/LGT2 Indicates that a PR has LGTM 2. and removed status/LGT1 Indicates that a PR has LGTM 1. labels Nov 2, 2021
@breezewish
Copy link
Member

Please fill the release note, and pick up suitable release versions.

@breezewish
Copy link
Member

@SabaPing PTAL

@SabaPing
Copy link
Contributor Author

@SabaPing PTAL

I will back to this issue late afternoon today.

@breezewish
Copy link
Member

@SabaPing Do you have updates~?

@SabaPing
Copy link
Contributor Author

SabaPing commented Dec 1, 2021

@SabaPing Do you have updates~?

Ahhh, I spent more time than expected on development yesterday, and I also handled a few oncalls on cloud in the afternoon, so I really didn't have time.

I hope I can handle this issue this afternoon.

@SabaPing
Copy link
Contributor Author

SabaPing commented Dec 1, 2021

Manual test steps:

  1. Start TiDB with command line arguement -L=error.
  2. Slow logs should output normally.

@ti-chi-bot ti-chi-bot added release-note Denotes a PR that will be considered when it comes time to generate release notes. and removed release-note-none Denotes a PR that doesn't merit a release note. labels Dec 1, 2021
@SabaPing
Copy link
Contributor Author

SabaPing commented Dec 7, 2021

Fixed in #30461.

@SabaPing SabaPing closed this Dec 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release-note Denotes a PR that will be considered when it comes time to generate release notes. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. status/LGT2 Indicates that a PR has LGTM 2.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants