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
|
|
|
*
|
|
|
|
*
|
2000-01-26 06:58:53 +01:00
|
|
|
* Portions Copyright (c) 1996-2000, PostgreSQL, Inc
|
|
|
|
* Portions Copyright (c) 1994, Regents of the University of California
|
1996-08-28 03:59:28 +02:00
|
|
|
*
|
2001-01-14 06:08:17 +01:00
|
|
|
* $Id: elog.h,v 1.24 2001/01/14 05:08:16 tgl 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 */
|
1997-09-07 07:04:48 +02:00
|
|
|
#define NOTICE 0 /* random info - no special action */
|
1999-09-11 21:06:42 +02:00
|
|
|
#define ERROR (-1) /* user error - return to known state */
|
|
|
|
#define FATAL 1 /* fatal error - abort process */
|
2000-04-12 19:17:23 +02:00
|
|
|
#define REALLYFATAL 2 /* take down the other backends with me */
|
|
|
|
#define STOP REALLYFATAL
|
1999-09-11 21:06:42 +02:00
|
|
|
#define DEBUG (-2) /* debug message */
|
2000-04-12 19:17:23 +02:00
|
|
|
#define LOG DEBUG
|
1999-09-11 21:06:42 +02:00
|
|
|
#define NOIND (-3) /* debug message, don't indent as far */
|
1996-08-28 03:59:28 +02:00
|
|
|
|
2001-01-14 06:08:17 +01:00
|
|
|
/* Configurable parameters */
|
2000-05-31 02:28:42 +02:00
|
|
|
#ifdef ENABLE_SYSLOG
|
|
|
|
extern int Use_syslog;
|
|
|
|
#endif
|
2000-06-04 17:06:34 +02:00
|
|
|
extern bool Log_timestamp;
|
|
|
|
extern bool Log_pid;
|
|
|
|
|
2001-01-14 06:08:17 +01:00
|
|
|
|
2000-01-13 19:26:18 +01:00
|
|
|
#ifndef __GNUC__
|
2001-01-14 06:08:17 +01:00
|
|
|
extern void elog(int lev, const char *fmt, ...);
|
2000-04-12 19:17:23 +02:00
|
|
|
|
2000-01-13 19:26:18 +01:00
|
|
|
#else
|
|
|
|
/* This extension allows gcc to check the format string for consistency with
|
|
|
|
the supplied arguments. */
|
2001-01-14 06:08:17 +01:00
|
|
|
extern void elog(int lev, const char *fmt, ...)
|
|
|
|
__attribute__((format(printf, 2, 3)));
|
2000-04-12 19:17:23 +02:00
|
|
|
|
2000-01-13 19:26:18 +01:00
|
|
|
#endif
|
1997-09-07 07:04:48 +02:00
|
|
|
|
1999-09-11 21:06:42 +02:00
|
|
|
extern int DebugFileOpen(void);
|
2000-04-12 19:17:23 +02:00
|
|
|
|
1998-09-01 06:40:42 +02:00
|
|
|
#endif /* ELOG_H */
|