Commit 958a1c2a authored by Bruce Momjian's avatar Bruce Momjian

Cleanup of level ordering and add missing LOG entry.

parent f5648c20
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/error/elog.c,v 1.94 2002/03/06 06:10:24 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/utils/error/elog.c,v 1.95 2002/04/04 04:43:44 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -359,11 +359,11 @@ elog(int lev, const char *fmt,...) ...@@ -359,11 +359,11 @@ elog(int lev, const char *fmt,...)
switch (lev) switch (lev)
{ {
case DEBUG1:
case DEBUG2:
case DEBUG3:
case DEBUG4:
case DEBUG5: case DEBUG5:
case DEBUG4:
case DEBUG3:
case DEBUG2:
case DEBUG1:
syslog_level = LOG_DEBUG; syslog_level = LOG_DEBUG;
break; break;
case LOG: case LOG:
...@@ -845,16 +845,16 @@ bool ...@@ -845,16 +845,16 @@ bool
check_server_min_messages(const char *lev) check_server_min_messages(const char *lev)
{ {
if (strcasecmp(lev, "debug") == 0 || if (strcasecmp(lev, "debug") == 0 ||
strcasecmp(lev, "debug1") == 0 ||
strcasecmp(lev, "debug2") == 0 ||
strcasecmp(lev, "debug3") == 0 ||
strcasecmp(lev, "debug4") == 0 ||
strcasecmp(lev, "debug5") == 0 || strcasecmp(lev, "debug5") == 0 ||
strcasecmp(lev, "log") == 0 || strcasecmp(lev, "debug4") == 0 ||
strcasecmp(lev, "debug3") == 0 ||
strcasecmp(lev, "debug2") == 0 ||
strcasecmp(lev, "debug1") == 0 ||
strcasecmp(lev, "info") == 0 || strcasecmp(lev, "info") == 0 ||
strcasecmp(lev, "notice") == 0 || strcasecmp(lev, "notice") == 0 ||
strcasecmp(lev, "warning") == 0 || strcasecmp(lev, "warning") == 0 ||
strcasecmp(lev, "error") == 0 || strcasecmp(lev, "error") == 0 ||
strcasecmp(lev, "log") == 0 ||
strcasecmp(lev, "fatal") == 0 || strcasecmp(lev, "fatal") == 0 ||
strcasecmp(lev, "panic") == 0) strcasecmp(lev, "panic") == 0)
return true; return true;
...@@ -865,19 +865,17 @@ void ...@@ -865,19 +865,17 @@ void
assign_server_min_messages(const char *lev) assign_server_min_messages(const char *lev)
{ {
if (strcasecmp(lev, "debug") == 0) if (strcasecmp(lev, "debug") == 0)
server_min_messages = DEBUG1; server_min_messages = DEBUG5;
else if (strcasecmp(lev, "debug1") == 0)
server_min_messages = DEBUG1;
else if (strcasecmp(lev, "debug2") == 0)
server_min_messages = DEBUG2;
else if (strcasecmp(lev, "debug3") == 0)
server_min_messages = DEBUG3;
else if (strcasecmp(lev, "debug4") == 0)
server_min_messages = DEBUG4;
else if (strcasecmp(lev, "debug5") == 0) else if (strcasecmp(lev, "debug5") == 0)
server_min_messages = DEBUG5; server_min_messages = DEBUG5;
else if (strcasecmp(lev, "log") == 0) else if (strcasecmp(lev, "debug4") == 0)
server_min_messages = LOG; server_min_messages = DEBUG4;
else if (strcasecmp(lev, "debug3") == 0)
server_min_messages = DEBUG3;
else if (strcasecmp(lev, "debug2") == 0)
server_min_messages = DEBUG2;
else if (strcasecmp(lev, "debug1") == 0)
server_min_messages = DEBUG1;
else if (strcasecmp(lev, "info") == 0) else if (strcasecmp(lev, "info") == 0)
server_min_messages = INFO; server_min_messages = INFO;
else if (strcasecmp(lev, "notice") == 0) else if (strcasecmp(lev, "notice") == 0)
...@@ -886,6 +884,8 @@ assign_server_min_messages(const char *lev) ...@@ -886,6 +884,8 @@ assign_server_min_messages(const char *lev)
server_min_messages = WARNING; server_min_messages = WARNING;
else if (strcasecmp(lev, "error") == 0) else if (strcasecmp(lev, "error") == 0)
server_min_messages = ERROR; server_min_messages = ERROR;
else if (strcasecmp(lev, "log") == 0)
server_min_messages = LOG;
else if (strcasecmp(lev, "fatal") == 0) else if (strcasecmp(lev, "fatal") == 0)
server_min_messages = FATAL; server_min_messages = FATAL;
else if (strcasecmp(lev, "panic") == 0) else if (strcasecmp(lev, "panic") == 0)
...@@ -899,12 +899,13 @@ bool ...@@ -899,12 +899,13 @@ bool
check_client_min_messages(const char *lev) check_client_min_messages(const char *lev)
{ {
if (strcasecmp(lev, "debug") == 0 || if (strcasecmp(lev, "debug") == 0 ||
strcasecmp(lev, "debug1") == 0 ||
strcasecmp(lev, "debug2") == 0 ||
strcasecmp(lev, "debug3") == 0 ||
strcasecmp(lev, "debug4") == 0 ||
strcasecmp(lev, "debug5") == 0 || strcasecmp(lev, "debug5") == 0 ||
strcasecmp(lev, "debug4") == 0 ||
strcasecmp(lev, "debug3") == 0 ||
strcasecmp(lev, "debug2") == 0 ||
strcasecmp(lev, "debug1") == 0 ||
strcasecmp(lev, "log") == 0 || strcasecmp(lev, "log") == 0 ||
strcasecmp(lev, "info") == 0 ||
strcasecmp(lev, "notice") == 0 || strcasecmp(lev, "notice") == 0 ||
strcasecmp(lev, "warning") == 0 || strcasecmp(lev, "warning") == 0 ||
strcasecmp(lev, "error") == 0) strcasecmp(lev, "error") == 0)
...@@ -916,19 +917,21 @@ void ...@@ -916,19 +917,21 @@ void
assign_client_min_messages(const char *lev) assign_client_min_messages(const char *lev)
{ {
if (strcasecmp(lev, "debug") == 0) if (strcasecmp(lev, "debug") == 0)
client_min_messages = DEBUG1; client_min_messages = DEBUG5;
else if (strcasecmp(lev, "debug1") == 0)
client_min_messages = DEBUG1;
else if (strcasecmp(lev, "debug2") == 0)
client_min_messages = DEBUG2;
else if (strcasecmp(lev, "debug3") == 0)
client_min_messages = DEBUG3;
else if (strcasecmp(lev, "debug4") == 0)
client_min_messages = DEBUG4;
else if (strcasecmp(lev, "debug5") == 0) else if (strcasecmp(lev, "debug5") == 0)
client_min_messages = DEBUG5; client_min_messages = DEBUG5;
else if (strcasecmp(lev, "debug4") == 0)
client_min_messages = DEBUG4;
else if (strcasecmp(lev, "debug3") == 0)
client_min_messages = DEBUG3;
else if (strcasecmp(lev, "debug2") == 0)
client_min_messages = DEBUG2;
else if (strcasecmp(lev, "debug1") == 0)
client_min_messages = DEBUG1;
else if (strcasecmp(lev, "log") == 0) else if (strcasecmp(lev, "log") == 0)
client_min_messages = LOG; client_min_messages = LOG;
else if (strcasecmp(lev, "info") == 0)
client_min_messages = INFO;
else if (strcasecmp(lev, "notice") == 0) else if (strcasecmp(lev, "notice") == 0)
client_min_messages = NOTICE; client_min_messages = NOTICE;
else if (strcasecmp(lev, "warning") == 0) else if (strcasecmp(lev, "warning") == 0)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment