summaryrefslogtreecommitdiff
path: root/src/include/utils/elog.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/include/utils/elog.h')
-rw-r--r--src/include/utils/elog.h37
1 files changed, 28 insertions, 9 deletions
diff --git a/src/include/utils/elog.h b/src/include/utils/elog.h
index 9c3b1f828c3..9be3d2a19a5 100644
--- a/src/include/utils/elog.h
+++ b/src/include/utils/elog.h
@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $Id: elog.h,v 1.30 2001/11/05 17:46:36 momjian Exp $
+ * $Id: elog.h,v 1.31 2002/03/02 21:39:35 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -15,15 +15,25 @@
#define ELOG_H
/* Error level codes */
-#define NOTICE 0 /* random info, sent to frontend */
-#define ERROR (-1) /* user error - return to known state */
-#define FATAL 1 /* fatal error - abort process */
-#define REALLYFATAL 2 /* take down the other backends with me */
-#define DEBUG (-2) /* debug message */
+#define DEBUG5 10 /* sent only to server logs, label DEBUG */
+#define DEBUG4 11 /* logs in decreasing detail */
+#define DEBUG3 12
+#define DEBUG2 13
+#define DEBUG1 14
+#define LOG 15 /* sent only to server logs by default,
+ * label LOG. */
+#define INFO 16 /* sent only to client by default, for
+ * informative messages that are part of
+ * normal query operation. */
+#define NOTICE 17 /* sent to client and server by default,
+ * important messages, for unusual cases that
+ * should be reported but are not serious
+ * enough to abort the query. */
+#define ERROR 18 /* user error - return to known state */
+#define FATAL 19 /* fatal error - abort process */
+#define PANIC 20 /* take down the other backends with me */
-/* temporary nonsense... */
-#define STOP REALLYFATAL
-#define LOG DEBUG
+/*#define DEBUG DEBUG5*/ /* Backward compatibility with pre-7.3 */
/* Configurable parameters */
#ifdef ENABLE_SYSLOG
@@ -32,6 +42,10 @@ extern int Use_syslog;
extern bool Log_timestamp;
extern bool Log_pid;
+extern char *server_min_messages_str;
+extern char *client_min_messages_str;
+extern const char server_min_messages_str_default[];
+extern const char client_min_messages_str_default[];
extern void
elog(int lev, const char *fmt,...)
@@ -41,4 +55,9 @@ __attribute__((format(printf, 2, 3)));
extern int DebugFileOpen(void);
+extern bool check_server_min_messages(const char *lev);
+extern void assign_server_min_messages(const char *lev);
+extern bool check_client_min_messages(const char *lev);
+extern void assign_client_min_messages(const char *lev);
+
#endif /* ELOG_H */