]> granicus.if.org Git - postgresql/blob - src/include/utils/elog.h
Change my-function-name-- to my_function_name, and optimizer renames.
[postgresql] / src / include / utils / elog.h
1 /*-------------------------------------------------------------------------
2  *
3  * elog.h
4  *        POSTGRES error logging definitions.
5  *
6  *
7  * Copyright (c) 1994, Regents of the University of California
8  *
9  * $Id: elog.h,v 1.10 1999/02/13 23:22:18 momjian Exp $
10  *
11  *-------------------------------------------------------------------------
12  */
13 #ifndef ELOG_H
14 #define ELOG_H
15
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 */
21
22 #ifdef NOT_USED
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 */
30 #endif
31
32 /***S*I***/
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
38
39
40 /* uncomment the following if you want your elog's to be timestamped */
41 /* #define ELOG_TIMESTAMPS */
42
43 extern void elog(int lev, const char *fmt,...);
44
45 #ifndef PG_STANDALONE
46 int                     DebugFileOpen(void);
47
48 #endif
49
50 #endif   /* ELOG_H */