1
0
mirror of https://github.com/postgres/postgres.git synced 2025-11-03 09:13:20 +03:00

Preliminary code cleanup in elog(). Split out some code into utility

functions, remove indent support, make sure all strings are marked
translatable.
This commit is contained in:
Peter Eisentraut
2001-06-08 21:16:49 +00:00
parent 24775c5cd5
commit 959dc927d3
5 changed files with 182 additions and 144 deletions

View File

@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
* $Id: elog.h,v 1.26 2001/03/22 04:01:11 momjian Exp $
* $Id: elog.h,v 1.27 2001/06/08 21:16:49 petere Exp $
*
*-------------------------------------------------------------------------
*/
@@ -15,36 +15,29 @@
#define ELOG_H
/* Error level codes */
#define NOTICE 0 /* random info - no special action */
#define NOTICE 0 /* random info, sent to frontend */
#define ERROR (-1) /* user error - return to known state */
#define FATAL 1 /* fatal error - abort process */
#define REALLYFATAL 2 /* take down the other backends with me */
#define STOP REALLYFATAL
#define DEBUG (-2) /* debug message */
/* temporary nonsense... */
#define STOP REALLYFATAL
#define LOG DEBUG
#define NOIND (-3) /* debug message, don't indent as far */
/* Configurable parameters */
#ifdef ENABLE_SYSLOG
extern int Use_syslog;
#endif
extern bool Log_timestamp;
extern bool Log_pid;
#ifndef __GNUC__
extern void elog(int lev, const char *fmt,...);
#else
extern void elog(int lev, const char *fmt,...)
/* This extension allows gcc to check the format string for consistency with
the supplied arguments. */
extern void
elog(int lev, const char *fmt,...)
__attribute__((format(printf, 2, 3)));
#endif
extern int DebugFileOpen(void);
#endif /* ELOG_H */