From: Hallvard Furuseth Date: Mon, 9 Dec 2002 18:18:14 +0000 (+0000) Subject: ITS#2215: Let Statslog() work if only one of LDAP_DEBUG/LDAP_SYSLOG is #defined X-Git-Tag: NO_SLAP_OP_BLOCKS~700 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=fbbbdd8b94202a6b5ee696fab056581b91f65d6f;p=openldap ITS#2215: Let Statslog() work if only one of LDAP_DEBUG/LDAP_SYSLOG is #defined --- diff --git a/servers/slapd/slap.h b/servers/slapd/slap.h index a763f6c4ee..a1b2bed4bb 100644 --- a/servers/slapd/slap.h +++ b/servers/slapd/slap.h @@ -1881,6 +1881,19 @@ typedef struct slap_conn { syslog( ldap_syslog_level, (fmt), (connid), (opid), (arg1), \ (arg2), (arg3) ); \ } 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 #define Statslog( level, fmt, connid, opid, arg1, arg2, arg3 ) #endif