patroni icon indicating copy to clipboard operation
patroni copied to clipboard

Excessive log messages

Open abh opened this issue 4 years ago • 1 comments

During normal operation the logs are very noisy with low value information. I was going to see if I could change the log level (we use the Postgres operator), but at a glance the important messages (secondary/leader swapping) are also logged with the INFO log level...

2019-08-23 05:50:08,234 INFO: Lock owner: ask-pg-1; I am ask-pg-0
2019-08-23 05:50:08,234 INFO: does not have lock
2019-08-23 05:50:08,253 INFO: no action.  i am a secondary and i am following a leader
2019-08-23 05:50:18,183 INFO: Lock owner: ask-pg-1; I am ask-pg-0
2019-08-23 05:50:18,183 INFO: does not have lock
2019-08-23 05:50:18,211 INFO: no action.  i am a secondary and i am following a leader

abh avatar Aug 23 '19 05:08 abh

+1. Agree, messages as "INFO: promoted self to leader by acquiring session lock" could be WARNING.

One idea would be also to store information on last (some X entries, not to burden) switchovers in DCS...just like repmgr has it. One can of course already use the on_role_change hook, but that needs configuring which is an extra hurdle.

kmoppel avatar Aug 23 '19 10:08 kmoppel