Re: PG levels vs. syslog levels - Mailing list pgsql-general

From Tom Lane
Subject Re: PG levels vs. syslog levels
Date
Msg-id 15438.1190325652@sss.pgh.pa.us
Whole thread Raw
In response to PG levels vs. syslog levels  (Steve Crawford <scrawford@pinpointresearch.com>)
List pgsql-general
Steve Crawford <scrawford@pinpointresearch.com> writes:
> What is the correlation between PostgreSQL log severity levels and
> syslog levels?

Hmm, doesn't seem to be documented anywhere, but a look into the source
code finds

        switch (edata->elevel)
        {
            case DEBUG5:
            case DEBUG4:
            case DEBUG3:
            case DEBUG2:
            case DEBUG1:
                syslog_level = LOG_DEBUG;
                break;
            case LOG:
            case COMMERROR:
            case INFO:
                syslog_level = LOG_INFO;
                break;
            case NOTICE:
            case WARNING:
                syslog_level = LOG_NOTICE;
                break;
            case ERROR:
                syslog_level = LOG_WARNING;
                break;
            case FATAL:
                syslog_level = LOG_ERR;
                break;
            case PANIC:
            default:
                syslog_level = LOG_CRIT;
                break;
        }

            regards, tom lane

pgsql-general by date:

Previous
From: "Scott Marlowe"
Date:
Subject: Re: autovacuum
Next
From: Tom Lane
Date:
Subject: Re: Adding domain type with CHECK constraints slow on large table