]> git.sur5r.net Git - openldap/blobdiff - include/ldap_log.h
Update copyright notices
[openldap] / include / ldap_log.h
index caa4ee2d2cb311786b17801fe4f2ebca11b29ebd..30f57c418c268304ba8766136d0b3a6f73cdd4d6 100644 (file)
@@ -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