916ce42a3817dd1609d97f38c6915a2462f1179b
[yaz-moved-to-github.git] / include / yaz / log.h
1 /*
2  * Copyright (c) 1995-2004, Index Data.
3  *
4  * Permission to use, copy, modify, distribute, and sell this software and
5  * its documentation, in whole or in part, for any purpose, is hereby granted,
6  * provided that:
7  *
8  * 1. This copyright and permission notice appear in all copies of the
9  * software and its documentation. Notices of copyright or attribution
10  * which appear at the beginning of any file must remain unchanged.
11  *
12  * 2. The name of Index Data or the individual authors may not be used to
13  * endorse or promote products derived from this software without specific
14  * prior written permission.
15  *
16  * THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTY OF ANY KIND,
17  * EXPRESS, IMPLIED, OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
18  * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
19  * IN NO EVENT SHALL INDEX DATA BE LIABLE FOR ANY SPECIAL, INCIDENTAL,
20  * INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, OR ANY DAMAGES
21  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER OR
22  * NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
23  * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
24  * OF THIS SOFTWARE.
25  *
26  * $Id: log.h,v 1.26 2004-12-09 09:37:00 adam Exp $
27  */
28
29 /**
30  * \file log.h
31  * \brief The old, deprecated header for log.c
32  */
33
34 #ifndef LOG_H
35 #define LOG_H
36
37 #include <yaz/ylog.h>
38
39 #ifndef YAZ_USE_OLD_LOG
40 /* #warning "use of log.h is deprecated, use ylog.h instead" */
41 /* if this warning gets on your nerves, run configure like this:
42  * CFLAGS="-Wall -g -D YAZ_USE_OLD_LOG" ./configure
43  */
44 #endif
45
46 YAZ_BEGIN_CDECL
47
48 /* The old LOG_ bit names are here for compatibility only. They may 
49  * conflict with bits defined in syslog.h, or other places. 'LOG'
50  * really is not such a good name. YLOG must be more unique
51  */
52 #define LOG_FATAL  YLOG_FATAL
53 #define LOG_DEBUG  YLOG_DEBUG
54 #define LOG_WARN   YLOG_WARN
55 #define LOG_LOG    YLOG_LOG /* Deprecated, use the modern dynamic log levels*/
56 #define LOG_ERRNO  YLOG_ERRNO 
57 #define LOG_FILE   0x00000020 /* Deprecated - not in ylog.h at all*/
58 #define LOG_APP    0x00000040 /* Deprecated - not in ylog.h at all*/
59 #define LOG_MALLOC YLOG_MALLOC /* deprecated */
60 #define LOG_NOTIME YLOG_NOTIME /* do not output date and time */
61 #define LOG_APP2   0x00000200 /* Deprecated - not in ylog.h at all*/
62 #define LOG_APP3   0x00000400 /* Deprecated - not in ylog.h at all*/
63 #define LOG_FLUSH  YLOG_FLUSH 
64  /*     LOG_LOGLVL is a new one in ylog.h. So new that no log.h users should
65   *     use it */
66
67 #define LOG_ALL    YLOG_ALL
68
69 #define LOG_DEFAULT_LEVEL YLOG_DEFAULT_LEVEL
70
71
72 /* logf is deprecated, as it conflicts with a math function */
73 #define logf yaz_log
74
75 YAZ_END_CDECL
76
77 #endif