1996-08-28 03:59:28 +02:00
|
|
|
/*-------------------------------------------------------------------------
|
|
|
|
*
|
|
|
|
* elog.h--
|
1997-09-07 07:04:48 +02:00
|
|
|
* POSTGRES error logging definitions.
|
1996-08-28 03:59:28 +02:00
|
|
|
*
|
|
|
|
*
|
|
|
|
* Copyright (c) 1994, Regents of the University of California
|
|
|
|
*
|
1997-09-07 07:04:48 +02:00
|
|
|
* $Id: elog.h,v 1.4 1997/09/07 05:02:27 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
|
|
|
|
|
1997-09-07 07:04:48 +02:00
|
|
|
#define NOTICE 0 /* random info - no special action */
|
|
|
|
#define WARN -1 /* Warning error - return to known state */
|
|
|
|
#define FATAL 1 /* Fatal error - abort process */
|
|
|
|
#define DEBUG -2 /* debug message */
|
|
|
|
#define NOIND -3 /* debug message, don't indent as far */
|
1996-08-28 03:59:28 +02:00
|
|
|
|
1997-09-07 07:04:48 +02:00
|
|
|
#define PTIME 0x100 /* prepend time to message */
|
|
|
|
#define POS 0x200 /* prepend source position to message */
|
|
|
|
#define USERMSG 0x400 /* send message to user */
|
|
|
|
#define TERM 0x800 /* send message to terminal */
|
|
|
|
#define DBLOG 0x1000 /* put message in per db log */
|
|
|
|
#define SLOG 0x2000 /* put message in system log */
|
|
|
|
#define ABORT 0x4000 /* abort process after logging */
|
1996-08-28 03:59:28 +02:00
|
|
|
|
|
|
|
#define ELOG_MAXLEN 4096
|
|
|
|
|
|
|
|
|
|
|
|
/* uncomment the following if you want your elog's to be timestamped */
|
|
|
|
/* #define ELOG_TIMESTAMPS */
|
|
|
|
|
1997-09-07 07:04:48 +02:00
|
|
|
extern void elog(int lev, const char *fmt,...);
|
|
|
|
|
1996-11-06 11:15:25 +01:00
|
|
|
#ifndef PG_STANDALONE
|
1997-09-07 07:04:48 +02:00
|
|
|
int DebugFileOpen(void);
|
|
|
|
|
1996-11-06 11:15:25 +01:00
|
|
|
#endif
|
1996-08-28 03:59:28 +02:00
|
|
|
|
1997-09-07 07:04:48 +02:00
|
|
|
#endif /* ELOG_H */
|