Added sanity check for NULL jobs to pcrs_exec_substitution
[privoxy.git] / errlog.h
1 #ifndef _ERRLOG_H
2 #define _ERRLOG_H
3 #define ERRLOG_H_VERSION "$Id: errlog.h,v 1.2 2001/05/20 01:11:40 jongfoster Exp $"
4 /*********************************************************************
5  *
6  * File        :  $Source: /cvsroot/ijbswa/current/errlog.h,v $
7  *
8  * Purpose     :  Log errors to a designated destination in an elegant,
9  *                printf-like fashion.
10  *
11  * Copyright   :  Written by and Copyright (C) 2001 the SourceForge
12  *                IJBSWA team.  http://ijbswa.sourceforge.net
13  *
14  *                Based on the Internet Junkbuster originally written
15  *                by and Copyright (C) 1997 Anonymous Coders and 
16  *                Junkbusters Corporation.  http://www.junkbusters.com
17  *
18  *                This program is free software; you can redistribute it 
19  *                and/or modify it under the terms of the GNU General
20  *                Public License as published by the Free Software
21  *                Foundation; either version 2 of the License, or (at
22  *                your option) any later version.
23  *
24  *                This program is distributed in the hope that it will
25  *                be useful, but WITHOUT ANY WARRANTY; without even the
26  *                implied warranty of MERCHANTABILITY or FITNESS FOR A
27  *                PARTICULAR PURPOSE.  See the GNU General Public
28  *                License for more details.
29  *
30  *                The GNU General Public License should be included with
31  *                this file.  If not, you can view it at
32  *                http://www.gnu.org/copyleft/gpl.html
33  *                or write to the Free Software Foundation, Inc., 59
34  *                Temple Place - Suite 330, Boston, MA  02111-1307, USA.
35  *
36  * Revisions   :
37  *    $Log: errlog.h,v $
38  *    Revision 1.2  2001/05/20 01:11:40  jongfoster
39  *    Added support for LOG_LEVEL_FATAL
40  *    Renamed LOG_LEVEL_FRC to LOG_LEVEL_FORCE,
41  *    and LOG_LEVEL_REF to LOG_LEVEL_RE_FILTER
42  *
43  *    Revision 1.1.1.1  2001/05/15 13:58:51  oes
44  *    Initial import of version 2.9.3 source tree
45  *
46  *
47  *********************************************************************/
48 \f
49
50 #ifdef __cplusplus
51 extern "C" {
52 #endif
53
54 /* Debug level for errors */
55
56 #define LOG_LEVEL_GPC        0x0001
57 #define LOG_LEVEL_CONNECT    0x0002
58 #define LOG_LEVEL_IO         0x0004
59 #define LOG_LEVEL_HEADER     0x0008
60 #define LOG_LEVEL_LOG        0x0010
61 #ifdef FORCE_LOAD
62 #define LOG_LEVEL_FORCE      0x0020
63 #endif /* def FORCE_LOAD */
64 #ifdef PCRS
65 #define LOG_LEVEL_RE_FILTER  0x0040
66 #endif /* def PCRS */
67 #ifdef FAST_REDIRECTS
68 #define LOG_LEVEL_REDIRECTS  0x0080
69 #endif /* def FAST_REDIRECTS */
70
71 /* Following are always on: */
72 #define LOG_LEVEL_INFO    0x1000
73 #define LOG_LEVEL_ERROR   0x2000
74 #define LOG_LEVEL_FATAL   0x4000 /* Exits after writing log */
75
76 extern void init_error_log(const char *prog_name, const char *logfname, int debuglevel);
77 extern void log_error(int loglevel, char *fmt, ...);
78
79 /* Revision control strings from this header and associated .c file */
80 extern const char errlog_rcs[];
81 extern const char errlog_h_rcs[];
82
83 #ifdef __cplusplus
84 } /* extern "C" */
85 #endif
86
87 #endif /* ndef _ERRLOG_H */
88
89 /*
90   Local Variables:
91   tab-width: 3
92   end:
93 */
94