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.33 2002/03/04 23:59:14 momjian Exp $
12 *-------------------------------------------------------------------------
17 /* Error level codes */
18 #define DEBUG5 10 /* Debugging messages, in categories
19 * of decreasing detail. */
24 #define LOG 15 /* Server operational history 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 ever
28 * try to send to client. */
29 #define INFO 17 /* Informative messages that are part of
30 * normal query operation; sent only to
31 * client by default. */
32 #define INFOALWAYS 18 /* Like INFO, but always prints to client */
33 #define NOTICE 19 /* Important messages, for unusual cases that
34 * should be reported but are not serious
35 * enough to abort the query. Sent to client
36 * and server log by default. */
37 #define ERROR 20 /* user error - return to known state */
38 #define FATAL 21 /* fatal error - abort process */
39 #define PANIC 22 /* take down the other backends with me */
41 /*#define DEBUG DEBUG1*/ /* Backward compatibility with pre-7.3 */
43 /* Configurable parameters */
45 extern int Use_syslog;
47 extern bool Log_timestamp;
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[];
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)));
61 extern int DebugFileOpen(void);
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);