Deprecated log.h and created a new ylog.h
[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.20 2004-11-18 15:18:13 heikki 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 #warning "use of log.h is deprecated, use logf.h instead"
39
40 #include <stdio.h>
41 #include <yaz/yconfig.h>
42 #include <yaz/xmalloc.h>
43
44 YAZ_BEGIN_CDECL
45
46 /* The old LOG_ bit names are here for compatibility only. They may 
47  * conflict with bits defined in syslog.h, or other places. 'LOG'
48  * really is not such a good name. YLOG must be more unique
49  */
50 #define LOG_FATAL  YLOG_FATAL
51 #define LOG_DEBUG  YLOG_DEBUG
52 #define LOG_WARN   YLOG_WARN
53 #define LOG_LOG    YLOG_LOG /* Deprecated, use the modern dynamic log levels*/
54 #define LOG_ERRNO  YLOG_ERRNO 
55  /*     LOG_FILE   discontinued */
56 #define LOG_APP    YLOG_APP   /* Deprecated */
57  /*     LOG_MALLOC discontinued */
58 #define LOG_NOTIME YLOG_NOTIME /* do not output date and time */
59 #define LOG_APP2   YLOG_APP2 /* deprecated */
60 #define LOG_APP3   YLOG_APP3 /* deprecated */
61 #define LOG_FLUSH  YLOG_FLUSH 
62  /*     LOG_LOGLVL so new that nobody should be using it.  */
63
64 #define LOG_ALL    YLOG_ALL
65
66 #define LOG_DEFAULT_LEVEL YLOG_DEFAULT_LEVEL
67
68
69
70 #endif