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
|
|
|
*
|
|
|
|
*
|
2001-01-24 20:43:33 +01:00
|
|
|
* Portions Copyright (c) 1996-2001, 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
|
|
|
*
|
2001-06-08 23:16:49 +02:00
|
|
|
* $Id: elog.h,v 1.27 2001/06/08 21:16:49 petere 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 */
|
2001-06-08 23:16:49 +02:00
|
|
|
#define NOTICE 0 /* random info, sent to frontend */
|
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 */
|
1999-09-11 21:06:42 +02:00
|
|
|
#define DEBUG (-2) /* debug message */
|
2001-06-08 23:16:49 +02:00
|
|
|
|
|
|
|
/* temporary nonsense... */
|
|
|
|
#define STOP REALLYFATAL
|
2000-04-12 19:17:23 +02:00
|
|
|
#define LOG DEBUG
|
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
|
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;
|
|
|
|
|
2001-01-14 06:08:17 +01:00
|
|
|
|
2001-06-08 23:16:49 +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);
|
2000-04-12 19:17:23 +02:00
|
|
|
|
1998-09-01 06:40:42 +02:00
|
|
|
#endif /* ELOG_H */
|