X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=include%2Fldap_log.h;h=30f57c418c268304ba8766136d0b3a6f73cdd4d6;hb=c38027902a17d6bd354074136ac1af4ecff38e4e;hp=caa4ee2d2cb311786b17801fe4f2ebca11b29ebd;hpb=2b7727882db19205f64db8031deb4a2d777b97d4;p=openldap diff --git a/include/ldap_log.h b/include/ldap_log.h index caa4ee2d2c..30f57c418c 100644 --- a/include/ldap_log.h +++ b/include/ldap_log.h @@ -1,6 +1,6 @@ /* $OpenLDAP$ */ /* - * Copyright 1998-2001 The OpenLDAP Foundation, Redwood City, California, USA + * Copyright 1998-2002 The OpenLDAP Foundation, Redwood City, California, USA * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -111,14 +111,18 @@ LDAP_BEGIN_DECL # ifdef LDAP_SYSLOG # define Debug( level, fmt, arg1, arg2, arg3 ) \ do { \ - lutil_debug( ldap_debug, (level), (fmt), (arg1), (arg2), (arg3) ); \ + if ( ldap_debug & (level) ) \ + lutil_debug( ldap_debug, (level), (fmt), (arg1), (arg2), (arg3) ); \ if ( ldap_syslog & (level) ) \ syslog( ldap_syslog_level, (fmt), (arg1), (arg2), (arg3) ); \ } while ( 0 ) # else # define Debug( level, fmt, arg1, arg2, arg3 ) \ - lutil_debug( ldap_debug, (level), (fmt), (arg1), (arg2), (arg3) ) + do { \ + if ( ldap_debug & (level) ) \ + lutil_debug( ldap_debug, (level), (fmt), (arg1), (arg2), (arg3) ); \ + } while ( 0 ) # endif #ifndef LDAP_LOG