elog() cleanup

Started by Bruce Momjianabout 24 years ago1 messageshackers
Jump to latest
#1Bruce Momjian
bruce@momjian.us

I have sent a patch to patches that has the following changes:

o Uniformly spaces tags so log message are indented the same amount:

LOG: database system was shut down at 2002-02-19 05:51:35 CET
LOG: checkpoint record is at 0/BF1D8AC
LOG: redo record is at 0/BF1D8AC; undo record is at 0/0; Shut...
LOG: next transaction id: 242; next oid: 866295
LOG: database system is ready
ERROR: parser: parse error at or near "asdf"

o Renames REALLYFATAL to CRASH (per Tom)

o Remove STOP and make it CRASH

o Add INFO level that prints only to the client

o Add LOG level to print messages only to the server log

o Cause VACUUM to only print to the client

o Change NOTICE to INFO when informational messages are sent. This
mimics the behavior of syslog(3). Before we only had NOTICE. INFO now
gives us LOG_INFO for messages like sequence creation with SERIAL:

LOG_ALERT A condition that should be corrected immediately, such as a
corrupted system database.

LOG_CRIT Critical conditions, e.g., hard device errors.

LOG_ERR Errors.

LOG_WARNING Warning messages.

LOG_NOTICE Conditions that are not error conditions, but should possi-
bly be handled specially.

LOG_INFO Informational messages.

LOG_DEBUG Messages that contain information normally of use only when
debugging a program.

o Server startup message now are labeled with LOG instead of DEBUG,
preventing confusion when people think they have debug enabled.

Comments?

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026