head	1.11;
access;
symbols
	Version_2_1:1.8
	Version_2:1.4
	C_Demo_1:1.4;
locks; strict;
comment	@ * @;


1.11
date	91.11.11.19.32.17;	author mer;	state Exp;
branches;
next	1.10;

1.10
date	91.11.06.14.32.04;	author clarsen;	state Exp;
branches;
next	1.9;

1.9
date	91.11.06.02.20.28;	author mer;	state Exp;
branches;
next	1.8;

1.8
date	91.02.21.23.00.44;	author mer;	state Exp;
branches;
next	1.7;

1.7
date	91.02.06.15.08.38;	author mer;	state Exp;
branches;
next	1.6;

1.6
date	90.09.21.11.13.26;	author goh;	state Exp;
branches;
next	1.5;

1.5
date	90.08.17.08.54.10;	author cimarron;	state Exp;
branches;
next	1.4;

1.4
date	89.09.05.17.08.10;	author mao;	state Version_2;
branches;
next	1.3;

1.3
date	89.04.12.19.55.02;	author dillon;	state Exp;
branches;
next	1.2;

1.2
date	89.03.22.17.33.44;	author muir;	state Stab;
branches;
next	1.1;

1.1
date	89.01.17.05.54.29;	author cimarron;	state Exp;
branches;
next	;


desc
@@


1.11
log
@prototyping changes
@
text
@/*
 * log.h --
 *	POSTGRES error logging definitions.
 *
 * Identification:
 *	$Header: /users/mer/postgres/src/lib/H/utils/RCS/log.h,v 1.10 1991/11/06 14:32:04 clarsen Exp $
 */

#ifndef	LogIncluded	/* Include this file only once. */
#define LogIncluded	1

#include "tmp/c.h"

#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 */

#define PTIME	0x100	/* prepend time to message */
#define POS	0x200	/* prepend source position to message */
#define USER	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 */

#define ELOG_MAXLEN 4096

#define SYSLOG_FD	5	/* file descriptor for system log file */
#define DBLOG_FD	6	/* file descriptor for dblog file */

extern int	Cline;
extern char	*Cfile;
extern int	ElogDebugIndentLevel;

#define TR(v, i, j)	(Cfile = __FILE__,Cline = __LINE__,v[i] & (1 << j))
#define TRM(v, i)	(Cfile = __FILE__,Cline = __LINE__,v[i] != 0)

#define SETR(v, i, j)	v[i] |= (1 << j)
#define SETRNG(v, s, e)	{ int i = s; for (i = s; i <= e; i++) v[i] = -1; }

#define ALLOCV(i)	(long *)calloc(i, sizeof (long))

void
EnableELog ARGS ((int enable));

/*
 * elog --
 *	Old error logging function.
 */
extern
void
elog ARGS(( int, ... ));

extern
int
dlog ARGS ((long lvl, char *mess));

#endif	/* !defined(LogIncluded) */
@


1.10
log
@prototypes
@
text
@d6 1
a6 1
 *	$Header: RCS/log.h,v 1.9 91/11/06 02:20:28 mer Exp Locker: clarsen $
d45 3
d55 4
@


1.9
log
@prototyping error fix
@
text
@d6 1
a6 1
 *	$Header: /users/mer/postgres/src/lib/H/utils/RCS/log.h,v 1.8 1991/02/21 23:00:44 mer Exp mer $
d51 1
a51 1
elog ARGS((va_alist));
@


1.8
log
@added file descriptor constants for system and db log files
@
text
@d6 1
a6 1
 *	$Header: RCS/log.h,v 1.7 91/02/06 15:08:38 mer Exp Locker: mer $
d51 1
a51 3
elog ARGS((
	...
));
@


1.7
log
@changed declaration to go with varargs definition
@
text
@d6 1
a6 1
 *	$Header: RCS/log.h,v 1.6 90/09/21 11:13:26 goh Exp Locker: mer $
d29 3
@


1.6
log
@now has #define for ELOG_MAXLEN ... if you think that
the line might be > than this, you should check in calling routine

- jeff
@
text
@d6 1
a6 1
 *	$Header: RCS/log.h,v 1.5 90/08/17 08:54:10 cimarron Exp $
a48 2
	const int	level,
	const String	format,
@


1.5
log
@added pathnames to #include statements
@
text
@d6 1
a6 1
 *	$Header: RCS/log.h,v 1.4 89/09/05 17:08:10 mao Version_2 Locker: cimarron $
d27 2
@


1.4
log
@Working version of C-only demo
@
text
@d6 1
a6 1
 *	$Header: /usr6/postgres/mao/postgres/src/lib/H/RCS/log.h,v 1.3 89/04/12 19:55:02 dillon Exp $
d12 1
a12 3
#ifndef C_H
#include "c.h"
#endif
@


1.3
log
@c.h
@
text
@d6 1
a6 1
 *	$Header: /usr6/postgres/dillon/ptree/src/lib/H/RCS/log.h,v 1.2 89/03/22 17:33:44 muir Stab $
@


1.2
log
@copyright removal
@
text
@d6 1
a6 1
 *	$Header: /usr6/postgres/muir/postgres/src/lib/H/RCS/log.h,v 1.1 89/01/17 05:54:29 cimarron Exp $
d12 1
d14 1
@


1.1
log
@Initial revision
@
text
@a0 27

; /*
; * 
; * POSTGRES Data Base Management System
; * 
; * Copyright (c) 1988 Regents of the University of California
; * 
; * Permission to use, copy, modify, and distribute this software and its
; * documentation for educational, research, and non-profit purposes and
; * without fee is hereby granted, provided that the above copyright
; * notice appear in all copies and that both that copyright notice and
; * this permission notice appear in supporting documentation, and that
; * the name of the University of California not be used in advertising
; * or publicity pertaining to distribution of the software without
; * specific, written prior permission.  Permission to incorporate this
; * software into commercial products can be obtained from the Campus
; * Software Office, 295 Evans Hall, University of California, Berkeley,
; * Ca., 94720 provided only that the the requestor give the University
; * of California a free licence to any derived software for educational
; * and research purposes.  The University of California makes no
; * representations about the suitability of this software for any
; * purpose.  It is provided "as is" without express or implied warranty.
; * 
; */



d6 1
a6 1
 *	$Header: log.h,v 1.1 88/11/11 16:37:15 postgres Exp $
@
