1 /*-------------------------------------------------------------------------
4 * POSTGRES error logging definitions.
7 * Copyright (c) 1994, Regents of the University of California
9 * $Id: elog.h,v 1.8 1998/09/01 04:39:03 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 */
32 #define ELOG_MAXLEN 4096
35 /* uncomment the following if you want your elog's to be timestamped */
36 /* #define ELOG_TIMESTAMPS */
38 extern void elog(int lev, const char *fmt,...);
41 int DebugFileOpen(void);