]> git.sur5r.net Git - openldap/blob - contrib/ldapc++/src/debug.h
Initial check of the LDAP C++ SDK written by Ralf Haferkamp <rhafer@suse.de>
[openldap] / contrib / ldapc++ / src / debug.h
1 /*
2  * Copyright 2000, OpenLDAP Foundation, All Rights Reserved.
3  * COPYING RESTRICTIONS APPLY, see COPYRIGHT file
4  */
5
6 #ifndef DEBUG_H
7 #define DEBUG_H
8 #include <iostream>
9
10 #define LDAP_DEBUG_NONE         0x0000
11 #define LDAP_DEBUG_TRACE        0x0001
12 #define LDAP_DEBUG_RESPONSE     0x0002
13 #define LDAP_DEBUG_REQUEST      0x0004
14 #define LDAP_DEBUG_PARAMETER    0x0008
15 #define LDAP_DEBUG_ANY -1
16
17 #define DEBUGLEVEL LDAP_DEBUG_ANY
18
19 #define PRINT_FILE      \
20         cerr << "file: " __FILE__  << " line: " << __LINE__ 
21
22 #define DEBUG(level, arg)       \
23     if(level & DEBUGLEVEL){     \
24         cerr  << arg ;          \
25     } 
26
27
28
29 #endif // DEBUG_H