1996-08-28 03:59:28 +02:00
|
|
|
/*-------------------------------------------------------------------------
|
|
|
|
*
|
1999-02-14 00:22:53 +01:00
|
|
|
* elog.h
|
1997-09-07 07:04:48 +02:00
|
|
|
* POSTGRES error logging definitions.
|
1996-08-28 03:59:28 +02:00
|
|
|
*
|
|
|
|
*
|
2002-06-20 22:29:54 +02:00
|
|
|
* Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group
|
2000-01-26 06:58:53 +01:00
|
|
|
* Portions Copyright (c) 1994, Regents of the University of California
|
1996-08-28 03:59:28 +02:00
|
|
|
*
|
2002-06-20 22:29:54 +02:00
|
|
|
* $Id: elog.h,v 1.38 2002/06/20 20:29:52 momjian Exp $
|
1996-08-28 03:59:28 +02:00
|
|
|
*
|
|
|
|
*-------------------------------------------------------------------------
|
|
|
|
*/
|
1997-09-07 07:04:48 +02:00
|
|
|
#ifndef ELOG_H
|
1996-08-28 03:59:28 +02:00
|
|
|
#define ELOG_H
|
|
|
|
|
2001-01-14 06:08:17 +01:00
|
|
|
/* Error level codes */
|
2002-03-05 00:59:14 +01:00
|
|
|
#define DEBUG5 10 /* Debugging messages, in categories
|
|
|
|
* of decreasing detail. */
|
|
|
|
#define DEBUG4 11
|
|
|
|
#define DEBUG3 12
|
|
|
|
#define DEBUG2 13
|
|
|
|
#define DEBUG1 14
|
2002-03-06 07:23:20 +01:00
|
|
|
#define LOG 15 /* Server operational messages;
|
2002-03-05 00:59:14 +01:00
|
|
|
* sent only to server log by default. */
|
|
|
|
#define COMMERROR 16 /* Client communication problems; same as
|
2002-03-06 07:23:20 +01:00
|
|
|
* LOG for server reporting, but never sent
|
|
|
|
* to client. */
|
|
|
|
#define INFO 17 /* Informative messages that are always sent to
|
|
|
|
* client; is not affected by
|
|
|
|
* client_min_messages */
|
|
|
|
#define NOTICE 18 /* Helpful messages to users about query
|
|
|
|
* operation; sent to client
|
2002-03-05 00:59:14 +01:00
|
|
|
* and server log by default. */
|
2002-03-06 07:23:20 +01:00
|
|
|
#define WARNING 19 /* Warnings */
|
|
|
|
#define ERROR 20 /* user error - abort transaction; return to known
|
|
|
|
* state */
|
2002-03-05 00:59:14 +01:00
|
|
|
#define FATAL 21 /* fatal error - abort process */
|
|
|
|
#define PANIC 22 /* take down the other backends with me */
|
2001-06-08 23:16:49 +02:00
|
|
|
|
2002-03-04 02:46:04 +01:00
|
|
|
/*#define DEBUG DEBUG1*/ /* Backward compatibility with pre-7.3 */
|
1996-08-28 03:59:28 +02:00
|
|
|
|
2001-01-14 06:08:17 +01:00
|
|
|
/* Configurable parameters */
|
2002-04-21 02:22:52 +02:00
|
|
|
#ifdef HAVE_SYSLOG
|
2001-03-22 05:01:46 +01:00
|
|
|
extern int Use_syslog;
|
2000-05-31 02:28:42 +02:00
|
|
|
#endif
|
2000-06-04 17:06:34 +02:00
|
|
|
extern bool Log_timestamp;
|
|
|
|
extern bool Log_pid;
|
|
|
|
|
Commit to match discussed elog() changes. Only update is that LOG is
now just below FATAL in server_min_messages. Added more text to
highlight ordering difference between it and client_min_messages.
---------------------------------------------------------------------------
REALLYFATAL => PANIC
STOP => PANIC
New INFO level the prints to client by default
New LOG level the prints to server log by default
Cause VACUUM information to print only to the client
NOTICE => INFO where purely information messages are sent
DEBUG => LOG for purely server status messages
DEBUG removed, kept as backward compatible
DEBUG5, DEBUG4, DEBUG3, DEBUG2, DEBUG1 added
DebugLvl removed in favor of new DEBUG[1-5] symbols
New server_min_messages GUC parameter with values:
DEBUG[5-1], INFO, NOTICE, ERROR, LOG, FATAL, PANIC
New client_min_messages GUC parameter with values:
DEBUG[5-1], LOG, INFO, NOTICE, ERROR, FATAL, PANIC
Server startup now logged with LOG instead of DEBUG
Remove debug_level GUC parameter
elog() numbers now start at 10
Add test to print error message if older elog() values are passed to elog()
Bootstrap mode now has a -d that requires an argument, like postmaster
2002-03-02 22:39:36 +01:00
|
|
|
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[];
|
2001-01-14 06:08:17 +01:00
|
|
|
|
2001-10-25 07:50:21 +02:00
|
|
|
extern void
|
|
|
|
elog(int lev, const char *fmt,...)
|
2000-01-13 19:26:18 +01:00
|
|
|
/* This extension allows gcc to check the format string for consistency with
|
|
|
|
the supplied arguments. */
|
2001-03-22 05:01:46 +01:00
|
|
|
__attribute__((format(printf, 2, 3)));
|
2000-04-12 19:17:23 +02:00
|
|
|
|
1999-09-11 21:06:42 +02:00
|
|
|
extern int DebugFileOpen(void);
|
2001-10-28 07:26:15 +01:00
|
|
|
|
2002-05-17 03:19:19 +02:00
|
|
|
extern const char *assign_server_min_messages(const char *newval,
|
|
|
|
bool doit, bool interactive);
|
|
|
|
extern const char *assign_client_min_messages(const char *newval,
|
|
|
|
bool doit, bool interactive);
|
Commit to match discussed elog() changes. Only update is that LOG is
now just below FATAL in server_min_messages. Added more text to
highlight ordering difference between it and client_min_messages.
---------------------------------------------------------------------------
REALLYFATAL => PANIC
STOP => PANIC
New INFO level the prints to client by default
New LOG level the prints to server log by default
Cause VACUUM information to print only to the client
NOTICE => INFO where purely information messages are sent
DEBUG => LOG for purely server status messages
DEBUG removed, kept as backward compatible
DEBUG5, DEBUG4, DEBUG3, DEBUG2, DEBUG1 added
DebugLvl removed in favor of new DEBUG[1-5] symbols
New server_min_messages GUC parameter with values:
DEBUG[5-1], INFO, NOTICE, ERROR, LOG, FATAL, PANIC
New client_min_messages GUC parameter with values:
DEBUG[5-1], LOG, INFO, NOTICE, ERROR, FATAL, PANIC
Server startup now logged with LOG instead of DEBUG
Remove debug_level GUC parameter
elog() numbers now start at 10
Add test to print error message if older elog() values are passed to elog()
Bootstrap mode now has a -d that requires an argument, like postmaster
2002-03-02 22:39:36 +01:00
|
|
|
|
2001-11-05 18:46:40 +01:00
|
|
|
#endif /* ELOG_H */
|