1 /*-------------------------------------------------------------------------
4 * POSTGRES error logging definitions.
7 * Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
8 * Portions Copyright (c) 1994, Regents of the University of California
10 * $Id: elog.h,v 1.31 2002/03/02 21:39:35 momjian Exp $
12 *-------------------------------------------------------------------------
17 /* Error level codes */
18 #define DEBUG5 10 /* sent only to server logs, label DEBUG */
19 #define DEBUG4 11 /* logs in decreasing detail */
23 #define LOG 15 /* sent only to server logs by default,
25 #define INFO 16 /* sent only to client by default, for
26 * informative messages that are part of
27 * normal query operation. */
28 #define NOTICE 17 /* sent to client and server by default,
29 * important messages, for unusual cases that
30 * should be reported but are not serious
31 * enough to abort the query. */
32 #define ERROR 18 /* user error - return to known state */
33 #define FATAL 19 /* fatal error - abort process */
34 #define PANIC 20 /* take down the other backends with me */
36 /*#define DEBUG DEBUG5*/ /* Backward compatibility with pre-7.3 */
38 /* Configurable parameters */
40 extern int Use_syslog;
42 extern bool Log_timestamp;
45 extern char *server_min_messages_str;
46 extern char *client_min_messages_str;
47 extern const char server_min_messages_str_default[];
48 extern const char client_min_messages_str_default[];
51 elog(int lev, const char *fmt,...)
52 /* This extension allows gcc to check the format string for consistency with
53 the supplied arguments. */
54 __attribute__((format(printf, 2, 3)));
56 extern int DebugFileOpen(void);
58 extern bool check_server_min_messages(const char *lev);
59 extern void assign_server_min_messages(const char *lev);
60 extern bool check_client_min_messages(const char *lev);
61 extern void assign_client_min_messages(const char *lev);