1 /*-------------------------------------------------------------------------
4 * POSTGRES error logging definitions.
7 * Copyright (c) 1994, Regents of the University of California
9 * $Id: elog.h,v 1.10 1999/02/13 23:22:18 momjian Exp $
11 *-------------------------------------------------------------------------
16 #define NOTICE 0 /* random info - no special action */
17 #define ERROR -1 /* user error - return to known state */
18 #define FATAL 1 /* Fatal error - abort process */
19 #define DEBUG -2 /* debug message */
20 #define NOIND -3 /* debug message, don't indent as far */
23 #define PTIME 0x100 /* prepend time to message */
24 #define POS 0x200 /* prepend source position to message */
25 #define USERMSG 0x400 /* send message to user */
26 #define TERM 0x800 /* send message to terminal */
27 #define DBLOG 0x1000 /* put message in per db log */
28 #define SLOG 0x2000 /* put message in system log */
29 #define ABORTX 0x4000 /* abort process after logging */
33 /* Increase this to be able to use postmaster -d 3 with complex
34 * view definitions (which are transformed to very, very large INSERT statements
35 * and if -d 3 is used the query string of these statements is printed using
36 * vsprintf which expects enough memory reserved! */
37 #define ELOG_MAXLEN 12288
40 /* uncomment the following if you want your elog's to be timestamped */
41 /* #define ELOG_TIMESTAMPS */
43 extern void elog(int lev, const char *fmt,...);
46 int DebugFileOpen(void);