ldapsdk 0.0.1
|
00001 // $OpenLDAP$ 00002 /* 00003 * Copyright 2000, OpenLDAP Foundation, All Rights Reserved. 00004 * COPYING RESTRICTIONS APPLY, see COPYRIGHT file 00005 */ 00006 00007 #ifndef DEBUG_H 00008 #define DEBUG_H 00009 #include <iostream> 00010 #include "config.h" 00011 #define LDAP_DEBUG_NONE 0x0000 00012 #define LDAP_DEBUG_TRACE 0x0001 00013 #define LDAP_DEBUG_CONSTRUCT 0x0002 00014 #define LDAP_DEBUG_DESTROY 0x0004 00015 #define LDAP_DEBUG_PARAMETER 0x0008 00016 #define LDAP_DEBUG_ANY 0xffff 00017 00018 #define DEBUGLEVEL LDAP_DEBUG_ANY 00019 00020 #define PRINT_FILE \ 00021 std::cerr << "file: " __FILE__ << " line: " << __LINE__ 00022 00023 #ifdef WITH_DEBUG 00024 #define DEBUG(level, arg) \ 00025 if((level) & DEBUGLEVEL){ \ 00026 std::cerr << arg ; \ 00027 } 00028 #else 00029 #undef DEBUG 00030 #define DEBUG(level,arg) 00031 #endif //WITH_DEBUG 00032 00033 #endif // DEBUG_H