mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-01-06 10:46:21 +08:00
ITS#2215: Let Statslog() work if only one of LDAP_DEBUG/LDAP_SYSLOG is #defined
This commit is contained in:
parent
3520850df7
commit
fbbbdd8b94
@ -1881,6 +1881,19 @@ typedef struct slap_conn {
|
|||||||
syslog( ldap_syslog_level, (fmt), (connid), (opid), (arg1), \
|
syslog( ldap_syslog_level, (fmt), (connid), (opid), (arg1), \
|
||||||
(arg2), (arg3) ); \
|
(arg2), (arg3) ); \
|
||||||
} while (0)
|
} while (0)
|
||||||
|
#elif defined(LDAP_DEBUG)
|
||||||
|
#define Statslog( level, fmt, connid, opid, arg1, arg2, arg3 ) \
|
||||||
|
do { \
|
||||||
|
if ( ldap_debug & (level) ) \
|
||||||
|
fprintf( stderr, (fmt), (connid), (opid), (arg1), (arg2), (arg3) );\
|
||||||
|
} while (0)
|
||||||
|
#elif defined(LDAP_SYSLOG)
|
||||||
|
#define Statslog( level, fmt, connid, opid, arg1, arg2, arg3 ) \
|
||||||
|
do { \
|
||||||
|
if ( ldap_syslog & (level) ) \
|
||||||
|
syslog( ldap_syslog_level, (fmt), (connid), (opid), (arg1), \
|
||||||
|
(arg2), (arg3) ); \
|
||||||
|
} while (0)
|
||||||
#else
|
#else
|
||||||
#define Statslog( level, fmt, connid, opid, arg1, arg2, arg3 )
|
#define Statslog( level, fmt, connid, opid, arg1, arg2, arg3 )
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user