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

Log "no action" messages at a DEBUG level #7

Merged
merged 1 commit into from
Jun 13, 2024

Conversation

alexeyklyukin
Copy link
Member

@alexeyklyukin alexeyklyukin commented Jun 13, 2024

Many people have to tune Patroni log level to WARNING, since messages like "no action: I am (patroni1), the leader with the lock" are emitted every HA loop run at an INFO level. Those are noisy and not terribly useful, as Patroni emits a different message anyway when the status quo changes.

This commit changes the default behavior by showing the "no action" message as an INFO for the first time, demoting subsequent repeated "no action" messages to DEBUG.

May people turn off INFO messages since they show "no action: I am
(patroni1), the leader with the lock" every HA loop run. Those are noisy
and not terribly useful, as Patroni will show a different message when
the status quo changes.

This commit changes the default behavior by showing the "no action"
message as an INFO for the first time, demoting subsequent repeated "no
action" messages to DEBUG.
@coveralls
Copy link

coveralls commented Jun 13, 2024

Pull Request Test Coverage Report for Build 9502013976

Details

  • 5 of 6 (83.33%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.007%) to 99.768%

Changes Missing Coverage Covered Lines Changed/Added Lines %
patroni/main.py 5 6 83.33%
Totals Coverage Status
Change from base Build 9500713889: -0.007%
Covered Lines: 13776
Relevant Lines: 13808

💛 - Coveralls

@alexeyklyukin alexeyklyukin marked this pull request as ready for review June 13, 2024 15:17
@alexeyklyukin alexeyklyukin changed the title Log no action at a DEBUG level Log "no action" messages at a DEBUG level Jun 13, 2024
Copy link

@graveland graveland left a comment

Choose a reason for hiding this comment

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

Fantastic!

@alexeyklyukin alexeyklyukin merged commit 90ec534 into master Jun 13, 2024
23 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants