]> granicus.if.org Git - postgresql/blob - src/include/utils/elog.h
Remove --enable-syslog option
[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.36 2002/04/21 00:22:52 ishii Exp $
11  *
12  *-------------------------------------------------------------------------
13  */
14 #ifndef ELOG_H
15 #define ELOG_H
16
17 /* Error level codes */
18 #define DEBUG5          10              /* Debugging messages, in categories
19                                                          * of decreasing detail. */
20 #define DEBUG4          11
21 #define DEBUG3          12                              
22 #define DEBUG2          13                              
23 #define DEBUG1          14                              
24 #define LOG                     15              /* Server operational messages;
25                                                          * sent only to server log by default. */
26 #define COMMERROR       16              /* Client communication problems; same as
27                                                          * LOG for server reporting, but never sent
28                                                          * to client. */
29 #define INFO            17              /* Informative messages that are always sent to
30                                                          * client;  is not affected by
31                                                          * client_min_messages */
32 #define NOTICE          18              /* Helpful messages to users about query
33                                                          * operation;  sent to client
34                                                          * and server log by default. */
35 #define WARNING         19              /* Warnings */
36 #define ERROR           20              /* user error - abort transaction; return to known
37                                                          * state */
38 #define FATAL           21              /* fatal error - abort process */
39 #define PANIC           22              /* take down the other backends with me */
40
41 /*#define DEBUG DEBUG1*/                /* Backward compatibility with pre-7.3 */
42
43 /* Configurable parameters */
44 #ifdef HAVE_SYSLOG
45 extern int      Use_syslog;
46 #endif
47 extern bool Log_timestamp;
48 extern bool Log_pid;
49
50 extern char        *server_min_messages_str;
51 extern char        *client_min_messages_str;
52 extern const char server_min_messages_str_default[];
53 extern const char client_min_messages_str_default[];
54
55 extern void
56 elog(int lev, const char *fmt,...)
57 /* This extension allows gcc to check the format string for consistency with
58    the supplied arguments. */
59 __attribute__((format(printf, 2, 3)));
60
61 extern int      DebugFileOpen(void);
62
63 extern bool check_server_min_messages(const char *lev);
64 extern void assign_server_min_messages(const char *lev);
65 extern bool check_client_min_messages(const char *lev);
66 extern void assign_client_min_messages(const char *lev);
67
68 #endif   /* ELOG_H */