Change error code severity for syslog?

From: Abhishek Bhola <abhishek(dot)bhola(at)japannext(dot)co(dot)jp>
To: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Change error code severity for syslog?
Date: 2023-10-12 00:42:47
Message-ID: CAEDsCzg0Lv7qvMiL1hg6Xo0KnYoPLrh1ZR7CKMdFdHOd9Dqa9A@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi

The Postgres errors when sent to syslog have their severity levels
translated as follows:
https://www.postgresql.org/docs/current/runtime-config-logging.html#RUNTIME-CONFIG-SEVERITY-LEVELS

I have a system which raises an alert every time syslog receives an ERROR
(or higher severity level).

For most of the Postgres errors, translating it to WARNING level in syslog
works, however, I wanted to translate *ERROR codes XX000/1/2* in Postgres
to be ERROR in syslog as well, so that it triggers the alert system and I
can notified.

Is there any way to change the severity level for these specific error
codes in Postgres?

Thanks

--
_This correspondence (including any attachments) is for the intended
recipient(s) only. It may contain confidential or privileged information or
both. No confidentiality or privilege is waived or lost by any
mis-transmission. If you receive this correspondence by mistake, please
contact the sender immediately, delete this correspondence (and all
attachments) and destroy any hard copies. You must not use, disclose, copy,
distribute or rely on any part of this correspondence (including any
attachments) if you are not the intended
recipient(s).本メッセージに記載および添付されている情報(以下、総称して「本情報」といいます。)は、本来の受信者による使用のみを意図しています。誤送信等により本情報を取得された場合でも、本情報に係る秘密、または法律上の秘匿特権が失われるものではありません。本電子メールを受取られた方が、本来の受信者ではない場合には、本情報及びそのコピーすべてを削除・破棄し、本電子メールが誤って届いた旨を発信者宛てにご通知下さいますようお願いします。本情報の閲覧、発信または本情報に基づくいかなる行為も明確に禁止されていることをご了承ください。_

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Michael Paquier 2023-10-12 00:59:01 Re: Change error code severity for syslog?
Previous Message Adrian Klaver 2023-10-12 00:35:49 Re: logs are not getting logged in error logs