postgresql/src/include/utils/elog.h

59 lines
1.8 KiB
C
Raw Normal View History

/*-------------------------------------------------------------------------
*
* elog.h
* POSTGRES error logging definitions.
*
*
2002-06-20 22:29:54 +02:00
* Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
2002-09-04 22:31:48 +02:00
* $Id: elog.h,v 1.40 2002/09/04 20:31:45 momjian Exp $
*
*-------------------------------------------------------------------------
*/
#ifndef ELOG_H
#define ELOG_H
/* Error level codes */
2002-09-04 22:31:48 +02:00
#define DEBUG5 10 /* Debugging messages, in categories of
* decreasing detail. */
#define DEBUG4 11
2002-09-04 22:31:48 +02:00
#define DEBUG3 12
#define DEBUG2 13
#define DEBUG1 14
#define LOG 15 /* Server operational messages; sent only
* to server log by default. */
#define COMMERROR 16 /* Client communication problems; same as
* 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 and server
* log by default. */
#define WARNING 19 /* Warnings */
#define ERROR 20 /* user error - abort transaction; return
* to known state */
#define FATAL 21 /* fatal error - abort process */
#define PANIC 22 /* take down the other backends with me */
2002-09-04 22:31:48 +02:00
/*#define DEBUG DEBUG1*/ /* Backward compatibility with pre-7.3 */
/* 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;
#endif
extern bool Log_timestamp;
extern bool Log_pid;
extern void
elog(int lev, const char *fmt,...)
/* 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)));
2002-09-04 22:31:48 +02:00
extern int DebugFileOpen(void);
#endif /* ELOG_H */