]> granicus.if.org Git - postgresql/blob - src/include/utils/elog.h
Add code to allow profiling of backends on Linux: save and restore the
[postgresql] / src / include / utils / elog.h
1 /*-------------------------------------------------------------------------
2  *
3  * elog.h
4  *        POSTGRES error logging definitions.
5  *
6  *
7  * Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
8  * Portions Copyright (c) 1994, Regents of the University of California
9  *
10  * $Id: elog.h,v 1.30 2001/11/05 17:46:36 momjian Exp $
11  *
12  *-------------------------------------------------------------------------
13  */
14 #ifndef ELOG_H
15 #define ELOG_H
16
17 /* Error level codes */
18 #define NOTICE  0                               /* random info, sent to frontend */
19 #define ERROR   (-1)                    /* user error - return to known state */
20 #define FATAL   1                               /* fatal error - abort process */
21 #define REALLYFATAL 2                   /* take down the other backends with me */
22 #define DEBUG   (-2)                    /* debug message */
23
24 /* temporary nonsense... */
25 #define STOP    REALLYFATAL
26 #define LOG             DEBUG
27
28 /* Configurable parameters */
29 #ifdef ENABLE_SYSLOG
30 extern int      Use_syslog;
31 #endif
32 extern bool Log_timestamp;
33 extern bool Log_pid;
34
35
36 extern void
37 elog(int lev, const char *fmt,...)
38 /* This extension allows gcc to check the format string for consistency with
39    the supplied arguments. */
40 __attribute__((format(printf, 2, 3)));
41
42 extern int      DebugFileOpen(void);
43
44 #endif   /* ELOG_H */