]> granicus.if.org Git - postgresql/blob - src/include/utils/elog.h
Removed ELOG_TIMESTAMPS #define in favor of two run-time
[postgresql] / src / include / utils / elog.h
1 /*-------------------------------------------------------------------------
2  *
3  * elog.h
4  *        POSTGRES error logging definitions.
5  *
6  *
7  * Portions Copyright (c) 1996-2000, PostgreSQL, Inc
8  * Portions Copyright (c) 1994, Regents of the University of California
9  *
10  * $Id: elog.h,v 1.18 2000/06/04 15:06:34 petere Exp $
11  *
12  *-------------------------------------------------------------------------
13  */
14 #ifndef ELOG_H
15 #define ELOG_H
16
17 #define NOTICE  0                               /* random info - no special action */
18 #define ERROR   (-1)                    /* user error - return to known state */
19 #define FATAL   1                               /* fatal error - abort process */
20 #define REALLYFATAL 2                   /* take down the other backends with me */
21 #define STOP    REALLYFATAL
22 #define DEBUG   (-2)                    /* debug message */
23 #define LOG             DEBUG
24 #define NOIND   (-3)                    /* debug message, don't indent as far */
25
26 #ifdef ENABLE_SYSLOG
27 extern int Use_syslog;
28 #endif
29
30 extern bool Log_timestamp;
31 extern bool Log_pid;
32
33 #ifndef __GNUC__
34 extern void elog(int lev, const char *fmt,...);
35
36 #else
37 /* This extension allows gcc to check the format string for consistency with
38    the supplied arguments. */
39 extern void elog(int lev, const char *fmt,...) __attribute__((format(printf, 2, 3)));
40
41 #endif
42
43 #ifndef PG_STANDALONE
44 extern int      DebugFileOpen(void);
45
46 #endif
47
48 #endif   /* ELOG_H */