]> granicus.if.org Git - postgresql/commit
Introduce a LOG_SERVER_ONLY ereport level, which is never sent to client.
authorTom Lane <tgl@sss.pgh.pa.us>
Mon, 4 Apr 2016 16:32:42 +0000 (12:32 -0400)
committerTom Lane <tgl@sss.pgh.pa.us>
Mon, 4 Apr 2016 16:32:42 +0000 (12:32 -0400)
commit66229ac0040cf1e0f5b9d72271aa9feaf3b3a37e
treeb2599d2bc1f7406150b65f9fbfe8c960c3527a4f
parent58666ed28ab59a2686ee08bc648b4e9959aacfce
Introduce a LOG_SERVER_ONLY ereport level, which is never sent to client.

This elevel is useful for logging audit messages and similar information
that should not be passed to the client.  It's equivalent to LOG in terms
of decisions about logging priority in the postmaster log, but messages
with this elevel will never be sent to the client.

In the current implementation, it's just an alias for the longstanding
COMMERROR elevel (or more accurately, we've made COMMERROR an alias for
this).  At some point it might be interesting to allow a LOG_ONLY flag to
be attached to any elevel, but that would be considerably more complicated,
and it's not clear there's enough use-cases to justify the extra work.
For now, let's just take the easy 90% solution.

David Steele, reviewed by Fabien Coelho, Petr JelĂ­nek, and myself
src/backend/utils/error/elog.c
src/include/utils/elog.h