1 #pragma ident "%Z%%M% %I% %E% SMI"
4 * The contents of this file are subject to the Netscape Public
5 * License Version 1.1 (the "License"); you may not use this file
6 * except in compliance with the License. You may obtain a copy of
7 * the License at http://www.mozilla.org/NPL/
9 * Software distributed under the License is distributed on an "AS
10 * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
11 * implied. See the License for the specific language governing
12 * rights and limitations under the License.
14 * The Original Code is Mozilla Communicator client code, released
17 * The Initial Developer of the Original Code is Netscape
18 * Communications Corporation. Portions created by Netscape are
19 * Copyright (C) 1998-1999 Netscape Communications Corporation. All
32 #define LDAP_DEBUG_TRACE 0x00001
33 #define LDAP_DEBUG_PACKETS 0x00002
34 #define LDAP_DEBUG_ARGS 0x00004
35 #define LDAP_DEBUG_CONNS 0x00008
36 #define LDAP_DEBUG_BER 0x00010
37 #define LDAP_DEBUG_FILTER 0x00020
38 #define LDAP_DEBUG_CONFIG 0x00040
39 #define LDAP_DEBUG_ACL 0x00080
40 #define LDAP_DEBUG_STATS 0x00100
41 #define LDAP_DEBUG_STATS2 0x00200
42 #define LDAP_DEBUG_SHELL 0x00400
43 #define LDAP_DEBUG_PARSE 0x00800
44 #define LDAP_DEBUG_HOUSE 0x01000
45 #define LDAP_DEBUG_REPL 0x02000
46 #define LDAP_DEBUG_ANY 0x04000
47 #define LDAP_DEBUG_CACHE 0x08000
48 #define LDAP_DEBUG_PLUGIN 0x10000
51 /* Disable by default */
52 #define LDAPDebug( level, fmt, arg1, arg2, arg3 )
57 /* SLAPD_LOGGING should not be on for WINSOCK (16-bit Windows) */
58 # if defined(SLAPD_LOGGING)
60 extern int *module_ldap_debug
;
61 # define LDAPDebug( level, fmt, arg1, arg2, arg3 ) \
63 if ( *module_ldap_debug & level ) { \
64 slapd_log_error_proc( NULL, fmt, arg1, arg2, arg3 ); \
68 extern int ldap_debug
;
69 # define LDAPDebug( level, fmt, arg1, arg2, arg3 ) \
71 if ( ldap_debug & level ) { \
72 slapd_log_error_proc( NULL, fmt, arg1, arg2, arg3 ); \
76 # else /* no SLAPD_LOGGING */
77 extern void ber_err_print( char * );
78 extern int ldap_debug
;
79 # define LDAPDebug( level, fmt, arg1, arg2, arg3 ) \
80 if ( ldap_debug & level ) { \
82 sprintf( msg, fmt, arg1, arg2, arg3 ); \
83 ber_err_print( msg ); \
85 # endif /* SLAPD_LOGGING */
86 #endif /* LDAP_DEBUG */