diff options
| author | Bruce Momjian <bruce@momjian.us> | 1998-09-01 04:40:42 +0000 |
|---|---|---|
| committer | Bruce Momjian <bruce@momjian.us> | 1998-09-01 04:40:42 +0000 |
| commit | fa1a8d6a97068295fe30ac646aec7493a6305bc2 (patch) | |
| tree | 645f7cef3c78fbab4d6d7bbc7c9a61ad2893d273 /src/backend/utils/error | |
| parent | af74855a608da4cd7ef88ceb2241ec1c75537f39 (diff) | |
| download | postgresql-fa1a8d6a97068295fe30ac646aec7493a6305bc2.tar.gz | |
OK, folks, here is the pgindent output.
Diffstat (limited to 'src/backend/utils/error')
| -rw-r--r-- | src/backend/utils/error/assert.c | 4 | ||||
| -rw-r--r-- | src/backend/utils/error/elog.c | 59 | ||||
| -rw-r--r-- | src/backend/utils/error/exc.c | 8 |
3 files changed, 36 insertions, 35 deletions
diff --git a/src/backend/utils/error/assert.c b/src/backend/utils/error/assert.c index b923028b5f..5f3312d9ea 100644 --- a/src/backend/utils/error/assert.c +++ b/src/backend/utils/error/assert.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/utils/error/assert.c,v 1.11 1998/09/01 03:26:35 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/utils/error/assert.c,v 1.12 1998/09/01 04:33:05 momjian Exp $ * * NOTE * This should eventually work with elog(), dlog(), etc. @@ -50,7 +50,7 @@ ExceptionalCondition(char *conditionName, else { EPRINTF("TRAP: %s(\"%s:%s\", File: \"%s\", Line: %d)\n", - exceptionP->message, conditionName, + exceptionP->message, conditionName, (detail == NULL ? "" : detail), fileName, lineNumber); } diff --git a/src/backend/utils/error/elog.c b/src/backend/utils/error/elog.c index 79ae7e8137..09f4627daf 100644 --- a/src/backend/utils/error/elog.c +++ b/src/backend/utils/error/elog.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/utils/error/elog.c,v 1.34 1998/09/01 03:26:37 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/utils/error/elog.c,v 1.35 1998/09/01 04:33:07 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -17,7 +17,7 @@ #include <fcntl.h> #ifndef O_RDONLY #include <sys/file.h> -#endif /* O_RDONLY */ +#endif /* O_RDONLY */ #include <sys/types.h> #include <stdarg.h> #include <errno.h> @@ -38,12 +38,12 @@ /* * Global option to control the use of syslog(3) for logging: * - * 0 stdout/stderr only - * 1 stdout/stderr + syslog - * 2 syslog only + * 0 stdout/stderr only + * 1 stdout/stderr + syslog + * 2 syslog only */ #define UseSyslog pg_options[OPT_SYSLOG] -#define PG_LOG_FACILITY LOG_LOCAL0 +#define PG_LOG_FACILITY LOG_LOCAL0 #else #define UseSyslog 0 #endif @@ -69,10 +69,12 @@ elog(int lev, const char *fmt,...) #ifndef PG_STANDALONE extern FILE *Pfout; + #endif #ifdef USE_SYSLOG int log_level; + #endif int len; @@ -135,25 +137,26 @@ elog(int lev, const char *fmt,...) va_end(ap); #ifdef USE_SYSLOG - switch (lev) { - case NOIND: - log_level = LOG_DEBUG; - break; - case DEBUG: - log_level = LOG_DEBUG; - break; - case NOTICE: - log_level = LOG_NOTICE; - break; - case ERROR: - log_level = LOG_WARNING; - break; - case FATAL: - default: - log_level = LOG_ERR; - break; + switch (lev) + { + case NOIND: + log_level = LOG_DEBUG; + break; + case DEBUG: + log_level = LOG_DEBUG; + break; + case NOTICE: + log_level = LOG_NOTICE; + break; + case ERROR: + log_level = LOG_WARNING; + break; + case FATAL: + default: + log_level = LOG_ERR; + break; } - write_syslog(log_level, line+TIMESTAMP_SIZE); + write_syslog(log_level, line + TIMESTAMP_SIZE); #endif len = strlen(strcat(line, "\n")); @@ -195,7 +198,7 @@ elog(int lev, const char *fmt,...) else pq_putnchar("E", 1); /* pq_putint(-101, 4); *//* should be query id */ - pq_putstr(line+TIMESTAMP_SIZE); /* don't show timestamps */ + pq_putstr(line + TIMESTAMP_SIZE); /* don't show timestamps */ pq_flush(); } if (Pfout == NULL) @@ -207,16 +210,16 @@ elog(int lev, const char *fmt,...) */ fputs(line, stderr); } -#endif /* !PG_STANDALONE */ +#endif /* !PG_STANDALONE */ if (lev == ERROR) { - extern bool InError; + extern bool InError; ProcReleaseSpins(NULL); /* get rid of spinlocks we hold */ if (!InError) { - kill(MyProcPid, SIGQUIT); /* abort to traffic cop */ + kill(MyProcPid, SIGQUIT); /* abort to traffic cop */ pause(); } diff --git a/src/backend/utils/error/exc.c b/src/backend/utils/error/exc.c index 3061edcc31..5fc7b2188a 100644 --- a/src/backend/utils/error/exc.c +++ b/src/backend/utils/error/exc.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/utils/error/Attic/exc.c,v 1.22 1998/09/01 03:26:38 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/utils/error/Attic/exc.c,v 1.23 1998/09/01 04:33:08 momjian Exp $ * * NOTE * XXX this code needs improvement--check for state violations and @@ -24,11 +24,9 @@ #include "utils/exc.h" #include "storage/ipc.h" -static void -ExcUnCaught(Exception *excP, ExcDetail detail, ExcData data, +static void ExcUnCaught(Exception *excP, ExcDetail detail, ExcData data, ExcMessage message); -static void -ExcPrint(Exception *excP, ExcDetail detail, ExcData data, +static void ExcPrint(Exception *excP, ExcDetail detail, ExcData data, ExcMessage message); /* |
