directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r942710 - /directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/ControlImpl.java
Date Mon, 10 May 2010 11:37:45 GMT
Author: elecharny
Date: Mon May 10 11:37:45 2010
New Revision: 942710

URL: http://svn.apache.org/viewvc?rev=942710&view=rev
Log:
Added some logs

Modified:
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/ControlImpl.java

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/ControlImpl.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/ControlImpl.java?rev=942710&r1=942709&r2=942710&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/ControlImpl.java
(original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/ControlImpl.java
Mon May 10 11:37:45 2010
@@ -26,6 +26,8 @@ import org.apache.directory.shared.asn1.
 import org.apache.directory.shared.asn1.codec.EncoderException;
 import org.apache.directory.shared.i18n.I18n;
 import org.apache.directory.shared.ldap.util.StringTools;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 
 /**
@@ -36,6 +38,12 @@ import org.apache.directory.shared.ldap.
  */
 public class ControlImpl extends AbstractControl 
 {
+    /** The logger */
+    static final Logger LOG = LoggerFactory.getLogger( ControlImpl.class );
+
+    /** Speedup for logs */
+    static final boolean IS_DEBUG = LOG.isDebugEnabled();
+
     /**
      * Default constructor.
      */
@@ -56,6 +64,11 @@ public class ControlImpl extends Abstrac
     {
         if ( value != null )
         {
+            if ( IS_DEBUG )
+            {
+                LOG.debug( "Control payoad for {} : {}", getOid(), StringTools.dumpBytes(
value ) );
+            }
+            
             this.value = new byte[ value.length ];
             System.arraycopy( value, 0, this.value, 0, value.length );
         } 



Mime
View raw message