aboutsummaryrefslogtreecommitdiff
path: root/src/include/utils/elog.h
blob: 1b1cb01684033fd596f7cf85fc28d1354f13c514 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
/*-------------------------------------------------------------------------
 *
 * elog.h--
 *	  POSTGRES error logging definitions.
 *
 *
 * Copyright (c) 1994, Regents of the University of California
 *
 * $Id: elog.h,v 1.7 1998/01/07 21:06:50 momjian Exp $
 *
 *-------------------------------------------------------------------------
 */
#ifndef ELOG_H
#define ELOG_H

#define NOTICE	0				/* random info - no special action */
#define ERROR	-1				/* user error - return to known state */
#define FATAL	1				/* Fatal error - abort process */
#define DEBUG	-2				/* debug message */
#define NOIND	-3				/* debug message, don't indent as far */

#ifdef NOT_USED
#define PTIME	0x100			/* prepend time to message */
#define POS		0x200			/* prepend source position to message */
#define USERMSG 0x400			/* send message to user */
#define TERM	0x800			/* send message to terminal */
#define DBLOG	0x1000			/* put message in per db log */
#define SLOG	0x2000			/* put message in system log */
#define ABORTX	0x4000			/* abort process after logging */
#endif

#define ELOG_MAXLEN 4096


/* uncomment the following if you want your elog's to be timestamped */
/* #define ELOG_TIMESTAMPS */

extern void elog(int lev, const char *fmt,...);

#ifndef PG_STANDALONE
int			DebugFileOpen(void);

#endif

#endif							/* ELOG_H */