Imported Upstream version 2.4.3
[platform/upstream/audit.git] / audisp / plugins / zos-remote / zos-remote-log.h
1 /***************************************************************************
2  *   Copyright (C) 2007 International Business Machines  Corp.             *
3  *   All Rights Reserved.                                                  *
4  *                                                                         *
5  *   This program is free software; you can redistribute it and/or modify  *
6  *   it under the terms of the GNU General Public License as published by  *
7  *   the Free Software Foundation; either version 2 of the License, or     *
8  *   (at your option) any later version.                                   *
9  *                                                                         *
10  *   This program is distributed in the hope that it will be useful,       *
11  *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
12  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
13  *   GNU General Public License for more details.                          *
14  *                                                                         *
15  *   You should have received a copy of the GNU General Public License     *
16  *   along with this program; if not, write to the                         *
17  *   Free Software Foundation, Inc.,                                       *
18  *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
19  *                                                                         *
20  * Authors:                                                                *
21  *   Klaus Heinrich Kiwi <klausk@br.ibm.com>                               *
22  ***************************************************************************/
23
24 #ifndef _ZOS_REMOTE_LOG_H
25 #define _ZOS_REMOTE_LOG_H
26
27 #include "zos-remote-ldap.h"
28
29 #include <syslog.h>
30 #include <sys/types.h>
31 #include <unistd.h>
32 #include <lber.h>
33
34 extern pid_t mypid;
35
36 void log_err(const char *, ...);
37 void log_warn(const char *, ...);
38 void log_info(const char *, ...);
39 void _log_debug(const char *, ...);
40 void _debug_bv(struct berval *);
41 void _debug_ber(BerElement *);
42
43 #ifdef DEBUG
44
45 #define log_debug(fmt, ...)        _log_debug(fmt, ## __VA_ARGS__)
46 #define debug_bv(bv)               _debug_bv(bv)
47 #define debug_ber(ber)             _debug_ber(ber)
48
49 #else
50
51 #define log_debug(fmt, ...)
52 #define debug_bv(bv)
53 #define debug_ber(ber)
54
55 #endif                 /* DEBUG */
56
57
58 #endif                          /* _ZOS_REMOTE_LOG_H */