Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Joe Martin
OpenLDAP
Commits
42de322f
Commit
42de322f
authored
Jun 06, 2003
by
Hallvard Furuseth
Browse files
Make all debug output macros conditional on defined(LDAP_DEBUG).
parent
af0bd5ab
Changes
4
Hide whitespace changes
Inline
Side-by-side
include/ldap_log.h
View file @
42de322f
...
...
@@ -139,6 +139,9 @@ LDAP_BEGIN_DECL
#ifdef NEW_LOGGING
extern
int
ldap_loglevels
[
LDAP_SUBSYS_NUM
];
#ifdef LDAP_DEBUG
#define LDAP_LOG(a, b, fmt, arg1, arg2, arg3) do {\
if (ldap_loglevels[LDAP_SUBSYS_##a] >= LDAP_LEVEL_##b || \
ldap_loglevels[LDAP_SUBSYS_GLOBAL] >= LDAP_LEVEL_##b)\
...
...
@@ -150,10 +153,13 @@ extern int ldap_loglevels[LDAP_SUBSYS_NUM];
(ldap_loglevels[LDAP_SUBSYS_##a] >= LDAP_LEVEL_##b || \
ldap_loglevels[LDAP_SUBSYS_GLOBAL] >= LDAP_LEVEL_##b)
#endif
/* LDAP_LOG */
#endif
/* LDAP_DEBUG */
#endif
/* NEW_LOGGING */
#ifndef LDAP_LOG
#define LDAP_LOG(a, b, fmt, arg1, arg2, arg3)
#define LDAP_LOGS_TEST(a, b) 0
#endif
LDAP_LUTIL_F
(
int
)
lutil_mnem2level
LDAP_P
((
const
char
*
level
));
...
...
libraries/libldap/ldap-int.h
View file @
42de322f
...
...
@@ -58,6 +58,9 @@
#include
"ldap_log.h"
#undef Debug
#ifdef LDAP_DEBUG
#define Debug( level, fmt, arg1, arg2, arg3 ) \
do { if ( ldap_debug & level ) \
ldap_log_printf( NULL, (level), (fmt), (arg1), (arg2), (arg3) ); \
...
...
@@ -66,6 +69,13 @@
#define LDAP_Debug( subsystem, level, fmt, arg1, arg2, arg3 )\
ldap_log_printf( NULL, (level), (fmt), (arg1), (arg2), (arg3) )
#else
#define Debug( level, fmt, arg1, arg2, arg3 ) ((void)0)
#define LDAP_Debug( subsystem, level, fmt, arg1, arg2, arg3 ) ((void)0)
#endif
/* LDAP_DEBUG */
#include
"ldap.h"
#include
"ldap_pvt.h"
...
...
libraries/libldap/os-ip.c
View file @
42de322f
...
...
@@ -52,11 +52,19 @@ int ldap_int_inet4or6 = AF_INET;
* ftp://koobera.math.uic.edu/www/docs/connect.html.
*/
#ifdef LDAP_DEBUG
#define osip_debug(ld,fmt,arg1,arg2,arg3) \
do { \
ldap_log_printf(NULL, LDAP_DEBUG_TRACE, fmt, arg1, arg2, arg3); \
} while(0)
#else
#define osip_debug(ld,fmt,arg1,arg2,arg3) ((void)0)
#endif
/* LDAP_DEBUG */
static
void
ldap_pvt_set_errno
(
int
err
)
{
...
...
libraries/libldap/os-local.c
View file @
42de322f
...
...
@@ -47,11 +47,19 @@
/* int ldap_int_tblsize = 0; */
#ifdef LDAP_DEBUG
#define oslocal_debug(ld,fmt,arg1,arg2,arg3) \
do { \
ldap_log_printf(ld, LDAP_DEBUG_TRACE, fmt, arg1, arg2, arg3); \
} while(0)
#else
#define oslocal_debug(ld,fmt,arg1,arg2,arg3) ((void)0)
#endif
/* LDAP_DEBUG */
static
void
ldap_pvt_set_errno
(
int
err
)
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment