directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject [directory-ldap-api] branch master updated: Encapsulated all calls to LOG.debug/info/warn/trace by a check to avoid useless compuations on the parameters
Date Tue, 10 Apr 2018 12:00:01 GMT
This is an automated email from the ASF dual-hosted git repository.

elecharny pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/directory-ldap-api.git


The following commit(s) were added to refs/heads/master by this push:
     new a3f52dd  Encapsulated all calls to LOG.debug/info/warn/trace by a check to avoid useless compuations on the parameters
a3f52dd is described below

commit a3f52dd91d953f643840d492a94398e128736328
Author: Emmanuel L├ęcharny <elecharny@symas.com>
AuthorDate: Tue Apr 10 13:59:55 2018 +0200

    Encapsulated all calls to LOG.debug/info/warn/trace by a check
    to avoid useless compuations on the parameters
---
 .../api/asn1/actions/AbstractReadBitString.java    |   5 +-
 .../api/asn1/actions/AbstractReadInteger.java      |   5 +-
 .../apache/directory/api/asn1/ber/Asn1Decoder.java |  25 +-
 .../api/asn1/ber/grammar/AbstractGrammar.java      |   5 +-
 .../directory/api/asn1/ber/tlv/BooleanDecoder.java |   5 +-
 .../directory/api/dsmlv2/engine/Dsmlv2Engine.java  |  20 +-
 .../apache/directory/api/dsmlv2/ParserUtils.java   |   6 +-
 .../ldap/client/api/AbstractLdapConnection.java    |   5 +-
 .../api/AbstractPoolableLdapConnectionFactory.java |  40 ++-
 .../client/api/DefaultLdapConnectionFactory.java   |  12 +-
 .../ldap/client/api/DefaultSchemaLoader.java       |   5 +-
 .../directory/ldap/client/api/EntryCursorImpl.java |   9 +-
 .../ldap/client/api/LdapConnectionPool.java        |  12 +-
 .../ldap/client/api/LdapNetworkConnection.java     | 360 +++++++++++++++++----
 .../client/api/NoVerificationTrustManager.java     |  30 +-
 .../ldap/client/api/SearchCursorImpl.java          |   9 +-
 .../ValidatingPoolableLdapConnectionFactory.java   |  29 +-
 .../client/api/callback/SaslCallbackHandler.java   |  35 +-
 .../client/template/LdapConnectionTemplate.java    |   6 +-
 .../api/ldap/codec/LdapMessageGrammar.java         |   3 -
 .../ldap/codec/actions/controls/AddControl.java    |   6 +-
 .../ldap/codec/actions/controls/InitControls.java  |   8 +-
 .../actions/controls/StoreControlCriticality.java  |   6 +-
 .../codec/actions/controls/StoreControlValue.java  |   5 +-
 .../codec/actions/ldapMessage/StoreMessageId.java  |   5 +-
 .../ldap/codec/actions/ldapResult/AddReferral.java |  16 +-
 .../codec/actions/ldapResult/InitReferrals.java    |   6 +-
 .../actions/ldapResult/StoreErrorMessage.java      |   6 +-
 .../codec/actions/ldapResult/StoreMatchedDN.java   |  13 +-
 .../codec/actions/ldapResult/StoreResultCode.java  |   6 +-
 .../request/abandon/InitAbandonRequest.java        |   9 +-
 .../request/add/AddAddRequestAttributeType.java    |   6 +-
 .../actions/request/add/AddAttributeValue.java     |   8 +-
 .../request/add/StoreAddRequestEntryName.java      |   5 +-
 .../codec/actions/request/bind/InitSaslBind.java   |   6 +-
 .../ldap/codec/actions/request/bind/StoreName.java |   6 +-
 .../actions/request/bind/StoreSaslCredentials.java |   6 +-
 .../actions/request/bind/StoreSaslMechanism.java   |   6 +-
 .../actions/request/bind/StoreSimpleAuth.java      |   6 +-
 .../codec/actions/request/bind/StoreVersion.java   |   6 +-
 .../request/compare/InitCompareRequest.java        |   5 +-
 .../compare/StoreCompareRequestAssertionValue.java |   6 +-
 .../compare/StoreCompareRequestAttributeDesc.java  |   6 +-
 .../compare/StoreCompareRequestEntryName.java      |   6 +-
 .../codec/actions/request/del/InitDelRequest.java  |   6 +-
 .../request/extended/InitExtendedRequest.java      |   5 +-
 .../request/extended/StoreExtendedRequestName.java |   6 +-
 .../extended/StoreExtendedRequestValue.java        |   6 +-
 .../request/modify/AddModifyRequestAttribute.java  |   6 +-
 .../actions/request/modify/InitAttributeVals.java  |   7 +-
 .../modify/StoreModifyRequestAttributeValue.java   |   6 +-
 .../modify/StoreModifyRequestObjectName.java       |   6 +-
 .../actions/request/modify/StoreOperationType.java |   6 +-
 .../request/modifydn/InitModifyDnRequest.java      |   5 +-
 .../modifydn/StoreModifyDnRequestDeleteOldRdn.java |   6 +-
 .../modifydn/StoreModifyDnRequestEntryName.java    |   6 +-
 .../modifydn/StoreModifyDnRequestNewRdn.java       |   6 +-
 .../modifydn/StoreModifyDnRequestNewSuperior.java  |  11 +-
 .../actions/request/search/InitSearchRequest.java  |   5 +-
 .../search/InitSearchRequestAttributeDescList.java |   6 +-
 .../search/StoreSearchRequestAttributeDesc.java    |   6 +-
 .../search/StoreSearchRequestBaseObject.java       |   5 +-
 .../search/StoreSearchRequestDerefAlias.java       |   6 +-
 .../request/search/StoreSearchRequestScope.java    |   6 +-
 .../search/StoreSearchRequestSizeLimit.java        |   6 +-
 .../search/StoreSearchRequestTimeLimit.java        |   6 +-
 .../search/StoreSearchRequestTypesOnly.java        |   6 +-
 .../request/search/StoreTypeMatchingRule.java      |   6 +-
 .../request/search/filter/InitAndFilter.java       |   6 +-
 .../search/filter/InitApproxMatchFilter.java       |   6 +-
 .../search/filter/InitAssertionValueFilter.java    |   6 +-
 .../search/filter/InitAttributeDescFilter.java     |   6 +-
 .../search/filter/InitEqualityMatchFilter.java     |   6 +-
 .../search/filter/InitExtensibleMatchFilter.java   |   6 +-
 .../search/filter/InitGreaterOrEqualFilter.java    |   6 +-
 .../search/filter/InitLessOrEqualFilter.java       |   6 +-
 .../request/search/filter/InitNotFilter.java       |   6 +-
 .../request/search/filter/InitOrFilter.java        |   6 +-
 .../request/search/filter/InitPresentFilter.java   |   6 +-
 .../search/filter/InitSubstringsFilter.java        |   6 +-
 .../actions/request/search/filter/StoreAny.java    |   6 +-
 .../actions/request/search/filter/StoreFinal.java  |   6 +-
 .../request/search/filter/StoreMatchValue.java     |   6 +-
 .../filter/StoreMatchingRuleDnAttributes.java      |   6 +-
 .../actions/response/add/InitAddResponse.java      |   5 +-
 .../response/bind/StoreServerSASLCreds.java        |   6 +-
 .../response/compare/InitCompareResponse.java      |   5 +-
 .../actions/response/del/InitDelResponse.java      |   5 +-
 .../response/extended/InitExtendedResponse.java    |   5 +-
 .../extended/StoreExtendedResponseName.java        |   6 +-
 .../extended/StoreExtendedResponseValue.java       |   6 +-
 .../intermediate/InitIntermediateResponse.java     |   5 +-
 .../StoreIntermediateResponseName.java             |   6 +-
 .../StoreIntermediateResponseValue.java            |   6 +-
 .../response/modify/InitModifyResponse.java        |   5 +-
 .../response/modifydn/InitModifyDnResponse.java    |   5 +-
 .../response/search/done/InitSearchResultDone.java |   5 +-
 .../response/search/entry/AddAttributeType.java    |   6 +-
 .../entry/StoreSearchResultAttributeValue.java     |  16 +-
 .../entry/StoreSearchResultEntryObjectName.java    |   6 +-
 .../reference/InitSearchResultReference.java       |   5 +-
 .../response/search/reference/StoreReference.java  |   6 +-
 .../directory/api/ldap/codec/api/LdapDecoder.java  |   5 +-
 .../search/entryChange/EntryChangeGrammar.java     |   9 +-
 .../search/pagedSearch/PagedResultsGrammar.java    |   5 +-
 .../persistentSearch/PersistentSearchGrammar.java  |   9 +-
 .../codec/controls/sort/SortRequestGrammar.java    |  10 +-
 .../codec/controls/sort/SortResponseGrammar.java   |   6 +-
 .../ldap/codec/osgi/DefaultLdapCodecService.java   |  54 +++-
 .../ldap/codec/standalone/CodecFactoryUtil.java    | 192 +++++++++--
 .../codec/standalone/StandaloneLdapApiService.java |  33 +-
 .../extras/controls/ad_impl/AdDirSyncGrammar.java  |   9 +-
 .../controls/ad_impl/AdPolicyHintsGrammar.java     |   2 -
 .../extras/controls/ppolicy_impl/PPolicyInit.java  |   6 +-
 .../syncrepl_impl/SyncDoneValueGrammar.java        |   7 +-
 .../syncrepl_impl/SyncRequestValueGrammar.java     |  11 +-
 .../syncrepl_impl/SyncStateValueGrammar.java       |   9 +-
 .../controls/vlv_impl/InitByOffsetSequence.java    |   6 +-
 .../vlv_impl/InitVirtualListViewRequest.java       |   6 +-
 .../vlv_impl/VirtualListViewRequestGrammar.java    |   2 -
 .../vlv_impl/VirtualListViewResponseGrammar.java   |   2 -
 .../extended/ads_impl/cancel/CancelGrammar.java    |   5 +-
 .../certGeneration/CertGenerationGrammar.java      |  11 +-
 .../EndTransactionRequestGrammar.java              |   7 +-
 .../EndTransactionResponseGrammar.java             |   3 -
 .../endTransaction/controls/ControlsGrammar.java   |   3 -
 .../controls/actions/AddControl.java               |   6 +-
 .../controls/actions/StoreControlCriticality.java  |   6 +-
 .../controls/actions/StoreControlValue.java        |   6 +-
 .../GracefulDisconnectGrammar.java                 |   9 +-
 .../gracefulShutdown/GracefulShutdownGrammar.java  |   9 +-
 .../pwdModify/PasswordModifyRequestGrammar.java    |  15 +-
 .../pwdModify/PasswordModifyResponseGrammar.java   |   5 +-
 .../ads_impl/whoAmI/WhoAmIResponseGrammar.java     |   3 -
 .../syncrepl_impl/SyncInfoValueGrammar.java        |  39 ++-
 .../api/ldap/model/cursor/EmptyCursor.java         |   9 +-
 .../api/ldap/model/cursor/ListCursor.java          |   9 +-
 .../directory/api/ldap/model/cursor/SetCursor.java |   9 +-
 .../api/ldap/model/cursor/SingletonCursor.java     |   9 +-
 .../api/ldap/model/entry/DefaultAttribute.java     |  21 +-
 .../api/ldap/model/entry/DefaultEntry.java         |  45 ++-
 .../directory/api/ldap/model/entry/Value.java      |  11 +-
 .../api/ldap/model/ldif/LdifAttributesReader.java  |  35 +-
 .../directory/api/ldap/model/ldif/LdifReader.java  |  62 +++-
 .../api/ldap/model/message/SearchParams.java       |   6 +-
 .../schema/comparators/DeepTrimComparator.java     |  12 +-
 .../comparators/DeepTrimToLowerComparator.java     |   6 +-
 .../schema/comparators/NormalizingComparator.java  |  12 +-
 .../model/schema/comparators/UuidComparator.java   |   7 +-
 .../model/schema/parsers/AbstractSchemaParser.java |   5 +-
 .../registries/DefaultAttributeTypeRegistry.java   |   6 +-
 .../registries/DefaultComparatorRegistry.java      |   6 +-
 .../DefaultDitStructureRuleRegistry.java           |  32 +-
 .../registries/DefaultNormalizerRegistry.java      |   5 +-
 .../registries/DefaultSchemaObjectRegistry.java    |  53 ++-
 .../registries/DefaultSyntaxCheckerRegistry.java   |   5 +-
 .../ldap/model/schema/registries/OidRegistry.java  |  28 +-
 .../ldap/model/schema/registries/Registries.java   | 213 +++++++++---
 .../registries/helper/AttributeTypeHelper.java     | 115 +++++--
 .../registries/helper/MatchingRuleHelper.java      |   6 +-
 .../registries/helper/ObjectClassHelper.java       |  66 +++-
 .../codec/protocol/mina/LdapProtocolDecoder.java   |   7 +-
 .../codec/protocol/mina/LdapProtocolEncoder.java   |   5 +-
 .../api/ldap/schema/converter/SchemaToLdif.java    |  12 +-
 .../extractor/impl/DefaultSchemaLdifExtractor.java |  34 +-
 .../ldap/schema/extractor/impl/ResourceMap.java    |  10 +-
 .../ldap/schema/loader/JarLdifSchemaLoader.java    |   7 +-
 .../api/ldap/schema/loader/LdifSchemaLoader.java   |   9 +-
 .../ldap/schema/loader/SchemaEntityFactory.java    | 188 +++++++++--
 .../ldap/schema/loader/SingleLdifSchemaLoader.java |   5 +-
 .../schema/manager/impl/DefaultSchemaManager.java  | 119 +++++--
 .../org/apache/directory/api/util/MethodUtils.java |  10 +-
 .../org/apache/directory/api/util/OsgiUtils.java   |  36 ++-
 .../org/apache/directory/api/util/Strings.java     |  12 +-
 174 files changed, 1900 insertions(+), 998 deletions(-)

diff --git a/asn1/ber/src/main/java/org/apache/directory/api/asn1/actions/AbstractReadBitString.java b/asn1/ber/src/main/java/org/apache/directory/api/asn1/actions/AbstractReadBitString.java
index 9c27619..e5af94b 100644
--- a/asn1/ber/src/main/java/org/apache/directory/api/asn1/actions/AbstractReadBitString.java
+++ b/asn1/ber/src/main/java/org/apache/directory/api/asn1/actions/AbstractReadBitString.java
@@ -42,9 +42,6 @@ public abstract class AbstractReadBitString<C extends Asn1Container> extends Gra
     /** The logger */
     private static final Logger LOG = LoggerFactory.getLogger( AbstractReadBitString.class );
 
-    /** Speedup for logs */
-    private static final boolean IS_DEBUG = LOG.isDebugEnabled();
-
 
     /**
      * Instantiates a new AbstractReadByteArray action.
@@ -89,7 +86,7 @@ public abstract class AbstractReadBitString<C extends Asn1Container> extends Gra
         byte[] data = tlv.getValue().getData();
         setBitString( data, container );
 
-        if ( IS_DEBUG )
+        if ( LOG.isDebugEnabled() )
         {
             LOG.debug( I18n.msg( I18n.MSG_01101_BITSTRING_VALUE, Strings.dumpBytes( data ) ) );
         }
diff --git a/asn1/ber/src/main/java/org/apache/directory/api/asn1/actions/AbstractReadInteger.java b/asn1/ber/src/main/java/org/apache/directory/api/asn1/actions/AbstractReadInteger.java
index 4dd689c..2d14aff 100644
--- a/asn1/ber/src/main/java/org/apache/directory/api/asn1/actions/AbstractReadInteger.java
+++ b/asn1/ber/src/main/java/org/apache/directory/api/asn1/actions/AbstractReadInteger.java
@@ -45,9 +45,6 @@ public abstract class AbstractReadInteger<E extends Asn1Container> extends Gramm
     /** The logger */
     private static final Logger LOG = LoggerFactory.getLogger( AbstractReadInteger.class );
 
-    /** Speedup for logs */
-    private static final boolean IS_DEBUG = LOG.isDebugEnabled();
-
     /** the acceptable minimum value for the expected value to be parsed */
     private int minValue = 0;
 
@@ -118,7 +115,7 @@ public abstract class AbstractReadInteger<E extends Asn1Container> extends Gramm
         {
             int number = IntegerDecoder.parse( value, minValue, maxValue );
 
-            if ( IS_DEBUG )
+            if ( LOG.isDebugEnabled() )
             {
                 LOG.debug( I18n.msg( I18n.MSG_01100_INTEGER_VALUE, number ) );
             }
diff --git a/asn1/ber/src/main/java/org/apache/directory/api/asn1/ber/Asn1Decoder.java b/asn1/ber/src/main/java/org/apache/directory/api/asn1/ber/Asn1Decoder.java
index 14bcdb7..a2e08f1 100644
--- a/asn1/ber/src/main/java/org/apache/directory/api/asn1/ber/Asn1Decoder.java
+++ b/asn1/ber/src/main/java/org/apache/directory/api/asn1/ber/Asn1Decoder.java
@@ -45,9 +45,6 @@ public class Asn1Decoder implements TLVBerDecoderMBean
     /** The logger */
     private static final Logger LOG = LoggerFactory.getLogger( Asn1Decoder.class );
 
-    /** A speedup for logger */
-    private static final boolean IS_DEBUG = LOG.isDebugEnabled();
-
     /** This flag is used to indicate that there are more bytes in the stream */
     private static final boolean MORE = true;
 
@@ -102,7 +99,7 @@ public class Asn1Decoder implements TLVBerDecoderMBean
             // Switch to the next state, which is the Length decoding
             container.setState( TLVStateEnum.LENGTH_STATE_START );
 
-            if ( IS_DEBUG )
+            if ( LOG.isDebugEnabled() )
             {
                 byte tag = container.getCurrentTLV().getTag();
                 LOG.debug( I18n.msg( I18n.MSG_01000_TAG_DECODED, Asn1StringUtils.dumpByte( tag ) ) );
@@ -140,7 +137,7 @@ public class Asn1Decoder implements TLVBerDecoderMBean
             current = current.getParent();
         }
 
-        if ( IS_DEBUG )
+        if ( LOG.isDebugEnabled() )
         {
             LOG.debug( I18n.msg( I18n.MSG_01001_TLV_TREE, sb.toString() ) );
         }
@@ -261,7 +258,7 @@ public class Asn1Decoder implements TLVBerDecoderMBean
             {
                 byte octet = stream.get();
 
-                if ( IS_DEBUG )
+                if ( LOG.isDebugEnabled() )
                 {
                     LOG.debug( I18n.msg( I18n.MSG_01002_CURRENT_BYTE, Asn1StringUtils.dumpByte( octet ) ) );
                 }
@@ -356,7 +353,7 @@ public class Asn1Decoder implements TLVBerDecoderMBean
         // exceeded by the current TLV.
         TLV parentTLV = container.getParentTLV();
 
-        if ( IS_DEBUG )
+        if ( LOG.isDebugEnabled() )
         {
             LOG.debug( I18n.msg( I18n.MSG_01003_PARENT_LENGTH, getParentLength( parentTLV ) ) );
         }
@@ -368,7 +365,7 @@ public class Asn1Decoder implements TLVBerDecoderMBean
             tlv.setExpectedLength( length );
             container.setParentTLV( tlv );
 
-            if ( IS_DEBUG )
+            if ( LOG.isDebugEnabled() )
             {
                 LOG.debug( I18n.msg( I18n.MSG_01004_ROOT_TLV, Integer.valueOf( length ) ) );
             }
@@ -384,7 +381,7 @@ public class Asn1Decoder implements TLVBerDecoderMBean
             {
                 // The expected length is lower than the Value length of the
                 // current TLV. This is an error...
-                if ( IS_DEBUG )
+                if ( LOG.isDebugEnabled() )
                 {
                     LOG.debug( I18n.msg( I18n.MSG_01005_TLV, 
                                 Integer.valueOf( expectedLength ), 
@@ -482,7 +479,7 @@ public class Asn1Decoder implements TLVBerDecoderMBean
 
         }
 
-        if ( IS_DEBUG )
+        if ( LOG.isDebugEnabled() )
         {
             LOG.debug( I18n.msg( I18n.MSG_01006_LENGTH_DECODED, Integer.valueOf( length ) ) );
         }
@@ -598,7 +595,7 @@ public class Asn1Decoder implements TLVBerDecoderMBean
     @SuppressWarnings("unchecked")
     private boolean treatTLVDoneState( ByteBuffer stream, Asn1Container container ) throws DecoderException
     {
-        if ( IS_DEBUG )
+        if ( LOG.isDebugEnabled() )
         {
             dumpTLVTree( container );
         }
@@ -674,7 +671,7 @@ public class Asn1Decoder implements TLVBerDecoderMBean
             throw new DecoderException( message );
         }
 
-        if ( IS_DEBUG )
+        if ( LOG.isDebugEnabled() )
         {
             LOG.debug( I18n.msg( I18n.MSG_01007_LINE_SEPARATOR1 ) );
             LOG.debug( I18n.msg( I18n.MSG_01011_DECODING_PDU ) );
@@ -683,7 +680,7 @@ public class Asn1Decoder implements TLVBerDecoderMBean
 
         while ( hasRemaining )
         {
-            if ( IS_DEBUG )
+            if ( LOG.isDebugEnabled() )
             {
                 LOG.debug( I18n.msg( I18n.MSG_01012_STATE, container.getState() ) );
 
@@ -761,7 +758,7 @@ public class Asn1Decoder implements TLVBerDecoderMBean
             }
         }
 
-        if ( IS_DEBUG )
+        if ( LOG.isDebugEnabled() )
         {
             LOG.debug( I18n.msg( I18n.MSG_01009_LINE_SEPARATOR3 ) );
 
diff --git a/asn1/ber/src/main/java/org/apache/directory/api/asn1/ber/grammar/AbstractGrammar.java b/asn1/ber/src/main/java/org/apache/directory/api/asn1/ber/grammar/AbstractGrammar.java
index 634d6c4..adf9f4a 100644
--- a/asn1/ber/src/main/java/org/apache/directory/api/asn1/ber/grammar/AbstractGrammar.java
+++ b/asn1/ber/src/main/java/org/apache/directory/api/asn1/ber/grammar/AbstractGrammar.java
@@ -41,9 +41,6 @@ public abstract class AbstractGrammar<C extends Asn1Container> implements Gramma
     /** The logger */
     private static final Logger LOG = LoggerFactory.getLogger( AbstractGrammar.class );
 
-    /** Speedup for logs */
-    private static final boolean IS_DEBUG = LOG.isDebugEnabled();
-
     /**
      * Table of transitions. It's a two dimension array, the first dimension
      * indices the states, the second dimension indices the Tag value, so it is
@@ -128,7 +125,7 @@ public abstract class AbstractGrammar<C extends Asn1Container> implements Gramma
             throw new DecoderException( errorMessage );
         }
 
-        if ( IS_DEBUG )
+        if ( LOG.isDebugEnabled() )
         {
             LOG.debug( transition.toString() );
         }
diff --git a/asn1/ber/src/main/java/org/apache/directory/api/asn1/ber/tlv/BooleanDecoder.java b/asn1/ber/src/main/java/org/apache/directory/api/asn1/ber/tlv/BooleanDecoder.java
index 5a8a6f8..df07db0 100644
--- a/asn1/ber/src/main/java/org/apache/directory/api/asn1/ber/tlv/BooleanDecoder.java
+++ b/asn1/ber/src/main/java/org/apache/directory/api/asn1/ber/tlv/BooleanDecoder.java
@@ -64,7 +64,10 @@ public final class BooleanDecoder
 
         if ( ( bytes[0] != 0 ) && ( bytes[0] != ( byte ) 0xFF ) )
         {
-            LOG.warn( I18n.msg( I18n.MSG_01300_BOOLEAN_0X00_0XFF ) );
+            if ( LOG.isWarnEnabled() )
+            {
+                LOG.warn( I18n.msg( I18n.MSG_01300_BOOLEAN_0X00_0XFF ) );
+            }
         }
 
         return bytes[0] != 0;
diff --git a/dsml/engine/src/main/java/org/apache/directory/api/dsmlv2/engine/Dsmlv2Engine.java b/dsml/engine/src/main/java/org/apache/directory/api/dsmlv2/engine/Dsmlv2Engine.java
index 632530d..a7a9211 100644
--- a/dsml/engine/src/main/java/org/apache/directory/api/dsmlv2/engine/Dsmlv2Engine.java
+++ b/dsml/engine/src/main/java/org/apache/directory/api/dsmlv2/engine/Dsmlv2Engine.java
@@ -304,7 +304,10 @@ public class Dsmlv2Engine
         }
         catch ( Exception e )
         {
-            LOG.warn( "Failed to bind", e );
+            if ( LOG.isWarnEnabled() )
+            {
+                LOG.warn( "Failed to bind", e );
+            }
 
             // Unable to connect to server
             // We create a new ErrorResponse and return the XML response.
@@ -395,7 +398,10 @@ public class Dsmlv2Engine
         }
         catch ( XmlPullParserException e )
         {
-            LOG.warn( "Failed while getting next request", e );
+            if ( LOG.isWarnEnabled() )
+            {
+                LOG.warn( "Failed while getting next request", e );
+            }
 
             int reqId = 0;
 
@@ -450,7 +456,10 @@ public class Dsmlv2Engine
             }
             catch ( Exception e )
             {
-                LOG.warn( "Failed to process request", e );
+                if ( LOG.isWarnEnabled() )
+                {
+                    LOG.warn( "Failed to process request", e );
+                }
 
                 // We create a new ErrorResponse and return the XML response.
                 ErrorResponse errorResponse = new ErrorResponse( request.getDecorated().getMessageId(),
@@ -813,7 +822,10 @@ public class Dsmlv2Engine
 
         if ( bindResponse.getLdapResult().getResultCode() != ResultCodeEnum.SUCCESS )
         {
-            LOG.warn( "Error : {}", bindResponse.getLdapResult().getDiagnosticMessage() );
+            if ( LOG.isWarnEnabled() )
+            {
+                LOG.warn( "Error : {}", bindResponse.getLdapResult().getDiagnosticMessage() );
+            }
         }
     }
 }
diff --git a/dsml/parser/src/main/java/org/apache/directory/api/dsmlv2/ParserUtils.java b/dsml/parser/src/main/java/org/apache/directory/api/dsmlv2/ParserUtils.java
index 348f8c4..ca89e4d 100644
--- a/dsml/parser/src/main/java/org/apache/directory/api/dsmlv2/ParserUtils.java
+++ b/dsml/parser/src/main/java/org/apache/directory/api/dsmlv2/ParserUtils.java
@@ -317,7 +317,11 @@ public final class ParserUtils
         }
         catch ( TransformerConfigurationException e1 )
         {
-            LOG.warn( "Failed to create the XSLT transformer", e1 );
+            if ( LOG.isWarnEnabled() )
+            {
+                LOG.warn( "Failed to create the XSLT transformer", e1 );
+            }
+            
             // return original document
             return document;
         }
diff --git a/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/AbstractLdapConnection.java b/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/AbstractLdapConnection.java
index d64d9ad..9254083 100644
--- a/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/AbstractLdapConnection.java
+++ b/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/AbstractLdapConnection.java
@@ -99,7 +99,10 @@ public abstract class AbstractLdapConnection extends IoHandlerAdapter implements
     @Override
     public void bind( String name ) throws LdapException
     {
-        LOG.debug( "Bind request : {}", name );
+        if ( LOG.isDebugEnabled() )
+        {
+            LOG.debug( "Bind request : {}", name );
+        }
 
         bind( new Dn( schemaManager, name ), null );
     }
diff --git a/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/AbstractPoolableLdapConnectionFactory.java b/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/AbstractPoolableLdapConnectionFactory.java
index 55fc692..acebc44 100644
--- a/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/AbstractPoolableLdapConnectionFactory.java
+++ b/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/AbstractPoolableLdapConnectionFactory.java
@@ -54,10 +54,18 @@ public abstract class AbstractPoolableLdapConnectionFactory implements PoolableO
     @Override
     public void activateObject( LdapConnection connection ) throws LdapException
     {
-        LOG.debug( "Activating {}", connection );
+        if ( LOG.isDebugEnabled() )
+        {
+            LOG.debug( "Activating {}", connection );
+        }
+        
         if ( !connection.isConnected() || !connection.isAuthenticated() )
         {
-            LOG.debug( "rebind due to connection dropped on {}", connection );
+            if ( LOG.isDebugEnabled() )
+            {
+                LOG.debug( "rebind due to connection dropped on {}", connection );
+            }
+            
             connectionFactory.bindConnection( connection );
         }
     }
@@ -72,7 +80,10 @@ public abstract class AbstractPoolableLdapConnectionFactory implements PoolableO
     @Override
     public void destroyObject( LdapConnection connection ) throws LdapException
     {
-        LOG.debug( "Destroying {}", connection );
+        if ( LOG.isDebugEnabled() )
+        {
+            LOG.debug( "Destroying {}", connection );
+        }
 
         try
         {
@@ -83,7 +94,11 @@ public abstract class AbstractPoolableLdapConnectionFactory implements PoolableO
         catch ( LdapException e )
         {
             LOG.error( "unable to unbind connection: {}", e.getMessage() );
-            LOG.debug( "unable to unbind connection:", e );
+
+            if ( LOG.isDebugEnabled() )
+            {
+                LOG.debug( "unable to unbind connection:", e );
+            }
         }
     }
 
@@ -109,7 +124,11 @@ public abstract class AbstractPoolableLdapConnectionFactory implements PoolableO
     @Override
     public LdapConnection makeObject() throws LdapException
     {
-        LOG.debug( "Creating a LDAP connection" );
+        if ( LOG.isDebugEnabled() )
+        {
+            LOG.debug( "Creating a LDAP connection" );
+        }
+        
         return connectionFactory.newLdapConnection();
     }
 
@@ -142,7 +161,10 @@ public abstract class AbstractPoolableLdapConnectionFactory implements PoolableO
     @Override
     public void passivateObject( LdapConnection connection ) throws LdapException
     {
-        LOG.debug( "Passivating {}", connection );
+        if ( LOG.isDebugEnabled() )
+        {
+            LOG.debug( "Passivating {}", connection );
+        }
     }
   
     
@@ -174,7 +196,11 @@ public abstract class AbstractPoolableLdapConnectionFactory implements PoolableO
     @Override
     public boolean validateObject( LdapConnection connection )
     {
-        LOG.debug( "Validating {}", connection );
+        if ( LOG.isDebugEnabled() )
+        {
+            LOG.debug( "Validating {}", connection );
+        }
+        
         return validator.validate( connection );
     }
 }
diff --git a/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/DefaultLdapConnectionFactory.java b/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/DefaultLdapConnectionFactory.java
index 9541622..8ea2f04 100755
--- a/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/DefaultLdapConnectionFactory.java
+++ b/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/DefaultLdapConnectionFactory.java
@@ -69,7 +69,11 @@ public class DefaultLdapConnectionFactory implements LdapConnectionFactory
         catch ( LdapException e )
         {
             LOG.error( "unable to bind connection: {}", e.getMessage() );
-            LOG.debug( "unable to bind connection:", e );
+            
+            if ( LOG.isDebugEnabled() )
+            {
+                LOG.debug( "unable to bind connection:", e );
+            }
 
             try
             {
@@ -78,7 +82,11 @@ public class DefaultLdapConnectionFactory implements LdapConnectionFactory
             catch ( IOException ioe )
             {
                 LOG.error( "unable to close failed bind connection: {}", e.getMessage(), ioe );
-                LOG.debug( "unable to close failed bind connection:", e );
+
+                if ( LOG.isDebugEnabled() )
+                {
+                    LOG.debug( "unable to close failed bind connection:", e );
+                }
             }
 
             throw e;
diff --git a/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/DefaultSchemaLoader.java b/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/DefaultSchemaLoader.java
index 163b142..97c6a11 100644
--- a/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/DefaultSchemaLoader.java
+++ b/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/DefaultSchemaLoader.java
@@ -264,7 +264,10 @@ public class DefaultSchemaLoader extends AbstractSchemaLoader
      */
     private void loadSchemas() throws LdapException
     {
-        LOG.debug( "initializing schemas" );
+        if ( LOG.isDebugEnabled() )
+        {
+            LOG.debug( "initializing schemas" );
+        }
 
         // Load all the elements from the SubschemaSubentry
         Entry subschemaSubentry = connection.lookup( subschemaSubentryDn,
diff --git a/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/EntryCursorImpl.java b/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/EntryCursorImpl.java
index ee4b29f..8dab8fe 100644
--- a/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/EntryCursorImpl.java
+++ b/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/EntryCursorImpl.java
@@ -54,9 +54,6 @@ public class EntryCursorImpl extends AbstractCursor<Entry> implements EntryCurso
     /** A dedicated log for cursors */
     private static final Logger LOG_CURSOR = LoggerFactory.getLogger( Loggers.CURSOR_LOG.getName() );
 
-    /** Speedup for logs */
-    private static final boolean IS_DEBUG = LOG_CURSOR.isDebugEnabled();
-
     /** a reference to hold the retrieved SearchResponse object from SearchFuture */
     private Response response;
 
@@ -74,7 +71,7 @@ public class EntryCursorImpl extends AbstractCursor<Entry> implements EntryCurso
      */
     public EntryCursorImpl( SearchCursor searchCursor )
     {
-        if ( IS_DEBUG )
+        if ( LOG_CURSOR.isDebugEnabled() )
         {
             LOG_CURSOR.debug( "Creating EntryCursorImpl {}", this );
         }
@@ -208,7 +205,7 @@ public class EntryCursorImpl extends AbstractCursor<Entry> implements EntryCurso
     @Override
     public void close() throws IOException
     {
-        if ( IS_DEBUG )
+        if ( LOG_CURSOR.isDebugEnabled() )
         {
             LOG_CURSOR.debug( "Closing EntryCursorImpl {}", this );
         }
@@ -223,7 +220,7 @@ public class EntryCursorImpl extends AbstractCursor<Entry> implements EntryCurso
     @Override
     public void close( Exception cause ) throws IOException
     {
-        if ( IS_DEBUG )
+        if ( LOG_CURSOR.isDebugEnabled() )
         {
             LOG_CURSOR.debug( "Closing EntryCursorImpl {}", this );
         }
diff --git a/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/LdapConnectionPool.java b/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/LdapConnectionPool.java
index 95c19ad..442f5cc 100644
--- a/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/LdapConnectionPool.java
+++ b/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/LdapConnectionPool.java
@@ -121,7 +121,11 @@ public class LdapConnectionPool extends GenericObjectPool<LdapConnection>
         try
         {
             connection = super.borrowObject();
-            LOG.trace( "borrowed connection {}", connection );
+            
+            if ( LOG.isTraceEnabled() )
+            {
+                LOG.trace( "borrowed connection {}", connection );
+            }
         }
         catch ( LdapException | RuntimeException e )
         {
@@ -163,7 +167,11 @@ public class LdapConnectionPool extends GenericObjectPool<LdapConnection>
         try
         {
             super.returnObject( connection );
-            LOG.trace( "returned connection {}", connection );
+
+            if ( LOG.isTraceEnabled() )
+            {
+                LOG.trace( "returned connection {}", connection );
+            }
         }
         catch ( LdapException e )
         {
diff --git a/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/LdapNetworkConnection.java b/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/LdapNetworkConnection.java
index 510ad18..9e30e70 100644
--- a/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/LdapNetworkConnection.java
+++ b/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/LdapNetworkConnection.java
@@ -581,7 +581,7 @@ public class LdapNetworkConnection extends AbstractLdapConnection implements Lda
     {
         ResponseFuture<? extends Response> future = futureMap.remove( messageId );
 
-        if ( ( future != null ) && LOG.isDebugEnabled() )
+        if ( LOG.isDebugEnabled() && ( future != null ) )
         {
             LOG.debug( I18n.msg( I18n.MSG_03227_REMOVING, messageId, future.getClass().getName() ) );
         }
@@ -595,7 +595,7 @@ public class LdapNetworkConnection extends AbstractLdapConnection implements Lda
         ResponseFuture<? extends Response> future = futureMap.get( messageId );
 
         // future can be null if there was a abandon operation on that messageId
-        if ( ( future != null ) && LOG.isDebugEnabled() )
+        if ( LOG.isDebugEnabled() && ( future != null ) )
         {
             LOG.debug( I18n.msg( I18n.MSG_03220_GETTING, messageId, future.getClass().getName() ) );
         }
@@ -680,9 +680,14 @@ public class LdapNetworkConnection extends AbstractLdapConnection implements Lda
             {
                 connector.dispose();
                 connector = null;
-                LOG.debug( I18n.msg( I18n.MSG_03221_INTERRUPTED_WAITING_FOR_CONNECTION, 
-                    config.getLdapHost(),
-                    config.getLdapPort() ), e );
+
+                if ( LOG.isDebugEnabled() )
+                {
+                    LOG.debug( I18n.msg( I18n.MSG_03221_INTERRUPTED_WAITING_FOR_CONNECTION, 
+                        config.getLdapHost(),
+                        config.getLdapPort() ), e );
+                }
+                
                 interrupted = true;
                 
                 throw new LdapOtherException( e.getMessage(), e );
@@ -697,19 +702,16 @@ public class LdapNetworkConnection extends AbstractLdapConnection implements Lda
                     {
                         Throwable connectionException = connectionFuture.getException();
 
-                        if ( ( connectionException instanceof ConnectException )
-                            || ( connectionException instanceof UnresolvedAddressException ) )
+                        if ( LOG.isDebugEnabled() )
                         {
-                            // No need to wait
-                            // We know that there was a permanent error such as "connection refused".
-                            if ( LOG.isDebugEnabled() )
+                            if ( ( connectionException instanceof ConnectException )
+                                || ( connectionException instanceof UnresolvedAddressException ) )
                             {
+                                // No need to wait
+                                // We know that there was a permanent error such as "connection refused".
                                 LOG.debug( I18n.msg( I18n.MSG_03245_CONNECTION_ERROR, connectionFuture.getException().getMessage() ) );
                             }
-                        }
 
-                        if ( LOG.isDebugEnabled() )
-                        {
                             LOG.debug( I18n.msg( I18n.MSG_03244_CONNECTION_RETRYING ) );
                         }
 
@@ -721,9 +723,14 @@ public class LdapNetworkConnection extends AbstractLdapConnection implements Lda
                         catch ( InterruptedException e )
                         {
                             connector = null;
-                            LOG.debug( I18n.msg( I18n.MSG_03221_INTERRUPTED_WAITING_FOR_CONNECTION, 
-                                config.getLdapHost(),
-                                config.getLdapPort() ), e );
+
+                            if ( LOG.isDebugEnabled() )
+                            {
+                                LOG.debug( I18n.msg( I18n.MSG_03221_INTERRUPTED_WAITING_FOR_CONNECTION, 
+                                    config.getLdapHost(),
+                                    config.getLdapPort() ), e );
+                            }
+                            
                             interrupted = true;
                             
                             throw new LdapOtherException( e.getMessage(), e );
@@ -791,11 +798,17 @@ public class LdapNetworkConnection extends AbstractLdapConnection implements Lda
             public void operationComplete( IoFuture future )
             {
                 // Process all the waiting operations and cancel them
-                LOG.debug( I18n.msg( I18n.MSG_03238_NOD_RECEIVED ) );
+                if ( LOG.isDebugEnabled() )
+                {
+                    LOG.debug( I18n.msg( I18n.MSG_03238_NOD_RECEIVED ) );
+                }
 
                 for ( ResponseFuture<?> responseFuture : futureMap.values() )
                 {
-                    LOG.debug( I18n.msg( I18n.MSG_03235_CLOSING, responseFuture ) );
+                    if ( LOG.isDebugEnabled() )
+                    {
+                        LOG.debug( I18n.msg( I18n.MSG_03235_CLOSING, responseFuture ) );
+                    }
 
                     responseFuture.cancel();
 
@@ -931,7 +944,12 @@ public class LdapNetworkConnection extends AbstractLdapConnection implements Lda
         if ( entry == null )
         {
             String msg = "Cannot add an empty entry";
-            LOG.debug( msg );
+            
+            if ( LOG.isDebugEnabled() )
+            {
+                LOG.debug( msg );
+            }
+            
             throw new IllegalArgumentException( msg );
         }
 
@@ -953,7 +971,12 @@ public class LdapNetworkConnection extends AbstractLdapConnection implements Lda
         if ( entry == null )
         {
             String msg = "Cannot add null entry";
-            LOG.debug( msg );
+            
+            if ( LOG.isDebugEnabled() )
+            {
+                LOG.debug( msg );
+            }
+            
             throw new IllegalArgumentException( msg );
         }
 
@@ -973,14 +996,24 @@ public class LdapNetworkConnection extends AbstractLdapConnection implements Lda
         if ( addRequest == null )
         {
             String msg = "Cannot process a null addRequest";
-            LOG.debug( msg );
+
+            if ( LOG.isDebugEnabled() )
+            {
+                LOG.debug( msg );
+            }
+            
             throw new IllegalArgumentException( msg );
         }
 
         if ( addRequest.getEntry() == null )
         {
             String msg = "Cannot add a null entry";
-            LOG.debug( msg );
+
+            if ( LOG.isDebugEnabled() )
+            {
+                LOG.debug( msg );
+            }
+            
             throw new IllegalArgumentException( msg );
         }
 
@@ -1048,14 +1081,24 @@ public class LdapNetworkConnection extends AbstractLdapConnection implements Lda
         if ( addRequest == null )
         {
             String msg = "Cannot process a null addRequest";
-            LOG.debug( msg );
+
+            if ( LOG.isDebugEnabled() )
+            {
+                LOG.debug( msg );
+            }
+            
             throw new IllegalArgumentException( msg );
         }
 
         if ( addRequest.getEntry() == null )
         {
             String msg = "Cannot add a null entry";
-            LOG.debug( msg );
+
+            if ( LOG.isDebugEnabled() )
+            {
+                LOG.debug( msg );
+            }
+            
             throw new IllegalArgumentException( msg );
         }
 
@@ -1089,7 +1132,12 @@ public class LdapNetworkConnection extends AbstractLdapConnection implements Lda
         if ( messageId < 0 )
         {
             String msg = "Cannot abandon a negative message ID";
-            LOG.debug( msg );
+
+            if ( LOG.isDebugEnabled() )
+            {
+                LOG.debug( msg );
+            }
+            
             throw new IllegalArgumentException( msg );
         }
 
@@ -1109,7 +1157,12 @@ public class LdapNetworkConnection extends AbstractLdapConnection implements Lda
         if ( abandonRequest == null )
         {
             String msg = "Cannot process a null abandonRequest";
-            LOG.debug( msg );
+
+            if ( LOG.isDebugEnabled() )
+            {
+                LOG.debug( msg );
+            }
+            
             throw new IllegalArgumentException( msg );
         }
 
@@ -1348,7 +1401,12 @@ public class LdapNetworkConnection extends AbstractLdapConnection implements Lda
         if ( bindRequest == null )
         {
             String msg = "Cannot process a null bindRequest";
-            LOG.debug( msg );
+
+            if ( LOG.isDebugEnabled() )
+            {
+                LOG.debug( msg );
+            }
+            
             throw new IllegalArgumentException( msg );
         }
 
@@ -1429,7 +1487,12 @@ public class LdapNetworkConnection extends AbstractLdapConnection implements Lda
         if ( bindRequest == null )
         {
             String msg = "Cannot process a null bindRequest";
-            LOG.debug( msg );
+
+            if ( LOG.isDebugEnabled() )
+            {
+                LOG.debug( msg );
+            }
+            
             throw new IllegalArgumentException( msg );
         }
 
@@ -1568,7 +1631,12 @@ public class LdapNetworkConnection extends AbstractLdapConnection implements Lda
         if ( request == null )
         {
             String msg = I18n.msg( I18n.MSG_03204_NULL_REQUEST );
-            LOG.debug( msg );
+
+            if ( LOG.isDebugEnabled() )
+            {
+                LOG.debug( msg );
+            }
+            
             throw new IllegalArgumentException( msg );
         }
 
@@ -1672,7 +1740,12 @@ public class LdapNetworkConnection extends AbstractLdapConnection implements Lda
         if ( request == null )
         {
             String msg = I18n.msg( I18n.MSG_03204_NULL_REQUEST );
-            LOG.debug( msg );
+
+            if ( LOG.isDebugEnabled() )
+            {
+                LOG.debug( msg );
+            }
+            
             throw new IllegalArgumentException( msg );
         }
 
@@ -1753,7 +1826,12 @@ public class LdapNetworkConnection extends AbstractLdapConnection implements Lda
         if ( request == null )
         {
             String msg = I18n.msg( I18n.MSG_03204_NULL_REQUEST );
-            LOG.debug( msg );
+
+            if ( LOG.isDebugEnabled() )
+            {
+                LOG.debug( msg );
+            }
+            
             throw new IllegalArgumentException( msg );
         }
 
@@ -1820,7 +1898,12 @@ public class LdapNetworkConnection extends AbstractLdapConnection implements Lda
         if ( request == null )
         {
             String msg = I18n.msg( I18n.MSG_03204_NULL_REQUEST );
-            LOG.debug( msg );
+
+            if ( LOG.isDebugEnabled() )
+            {
+                LOG.debug( msg );
+            }
+            
             throw new IllegalArgumentException( msg );
         }
 
@@ -1887,7 +1970,12 @@ public class LdapNetworkConnection extends AbstractLdapConnection implements Lda
         if ( request == null )
         {
             String msg = I18n.msg( I18n.MSG_03204_NULL_REQUEST );
-            LOG.debug( msg );
+
+            if ( LOG.isDebugEnabled() )
+            {
+                LOG.debug( msg );
+            }
+            
             throw new IllegalArgumentException( msg );
         }
 
@@ -2098,14 +2186,24 @@ public class LdapNetworkConnection extends AbstractLdapConnection implements Lda
         if ( searchRequest == null )
         {
             String msg = "Cannot process a null searchRequest";
-            LOG.debug( msg );
+
+            if ( LOG.isDebugEnabled() )
+            {
+                LOG.debug( msg );
+            }
+            
             throw new IllegalArgumentException( msg );
         }
 
         if ( searchRequest.getBase() == null )
         {
             String msg = "Cannot process a searchRequest which base DN is null";
-            LOG.debug( msg );
+
+            if ( LOG.isDebugEnabled() )
+            {
+                LOG.debug( msg );
+            }
+            
             throw new IllegalArgumentException( msg );
         }
 
@@ -2156,7 +2254,12 @@ public class LdapNetworkConnection extends AbstractLdapConnection implements Lda
         if ( searchRequest == null )
         {
             String msg = "Cannot process a null searchRequest";
-            LOG.debug( msg );
+            
+            if ( LOG.isDebugEnabled() )
+            {
+                LOG.debug( msg );
+            }
+            
             throw new IllegalArgumentException( msg );
         }
 
@@ -2273,7 +2376,11 @@ public class LdapNetworkConnection extends AbstractLdapConnection implements Lda
     @Override
     public void exceptionCaught( IoSession session, Throwable cause ) throws Exception
     {
-        LOG.warn( cause.getMessage(), cause );
+        if ( LOG.isWarnEnabled() )
+        {
+            LOG.warn( cause.getMessage(), cause );
+        }
+            
         session.setAttribute( EXCEPTION_KEY, cause );
 
         if ( cause instanceof ProtocolEncoderException )
@@ -2363,7 +2470,11 @@ public class LdapNetworkConnection extends AbstractLdapConnection implements Lda
 
         if ( ( responseFuture == null ) && !isNoD )
         {
-            LOG.info( "There is no future associated with the messageId {}, ignoring the message", messageId );
+            if ( LOG.isInfoEnabled() )
+            {
+                LOG.info( "There is no future associated with the messageId {}, ignoring the message", messageId );
+            }
+            
             return;
         }
 
@@ -2737,7 +2848,12 @@ public class LdapNetworkConnection extends AbstractLdapConnection implements Lda
         if ( ( modifications == null ) || ( modifications.length == 0 ) )
         {
             String msg = "Cannot process a ModifyRequest without any modification";
-            LOG.debug( msg );
+
+            if ( LOG.isDebugEnabled() )
+            {
+                LOG.debug( msg );
+            }
+            
             throw new IllegalArgumentException( msg );
         }
 
@@ -2774,7 +2890,12 @@ public class LdapNetworkConnection extends AbstractLdapConnection implements Lda
         if ( modRequest == null )
         {
             String msg = "Cannot process a null modifyRequest";
-            LOG.debug( msg );
+
+            if ( LOG.isDebugEnabled() )
+            {
+                LOG.debug( msg );
+            }
+            
             throw new IllegalArgumentException( msg );
         }
 
@@ -2848,14 +2969,24 @@ public class LdapNetworkConnection extends AbstractLdapConnection implements Lda
         if ( modRequest == null )
         {
             String msg = "Cannot process a null modifyRequest";
-            LOG.debug( msg );
+
+            if ( LOG.isDebugEnabled() )
+            {
+                LOG.debug( msg );
+            }
+            
             throw new IllegalArgumentException( msg );
         }
 
         if ( modRequest.getName() == null )
         {
             String msg = "Cannot process a modifyRequest which DN is null";
-            LOG.debug( msg );
+
+            if ( LOG.isDebugEnabled() )
+            {
+                LOG.debug( msg );
+            }
+            
             throw new IllegalArgumentException( msg );
         }
 
@@ -2907,14 +3038,24 @@ public class LdapNetworkConnection extends AbstractLdapConnection implements Lda
         if ( entryDn == null )
         {
             String msg = "Cannot process a rename of a null Dn";
-            LOG.debug( msg );
+
+            if ( LOG.isDebugEnabled() )
+            {
+                LOG.debug( msg );
+            }
+            
             throw new IllegalArgumentException( msg );
         }
 
         if ( newRdn == null )
         {
             String msg = "Cannot process a rename with a null Rdn";
-            LOG.debug( msg );
+
+            if ( LOG.isDebugEnabled() )
+            {
+                LOG.debug( msg );
+            }
+            
             throw new IllegalArgumentException( msg );
         }
 
@@ -2939,14 +3080,24 @@ public class LdapNetworkConnection extends AbstractLdapConnection implements Lda
         if ( entryDn == null )
         {
             String msg = "Cannot process a rename of a null Dn";
-            LOG.debug( msg );
+
+            if ( LOG.isDebugEnabled() )
+            {
+                LOG.debug( msg );
+            }
+            
             throw new IllegalArgumentException( msg );
         }
 
         if ( newRdn == null )
         {
             String msg = "Cannot process a rename with a null Rdn";
-            LOG.debug( msg );
+            
+            if ( LOG.isDebugEnabled() )
+            {
+                LOG.debug( msg );
+            }
+            
             throw new IllegalArgumentException( msg );
         }
 
@@ -2970,14 +3121,24 @@ public class LdapNetworkConnection extends AbstractLdapConnection implements Lda
         if ( entryDn == null )
         {
             String msg = "Cannot process a move of a null Dn";
-            LOG.debug( msg );
+
+            if ( LOG.isDebugEnabled() )
+            {
+                LOG.debug( msg );
+            }
+            
             throw new IllegalArgumentException( msg );
         }
 
         if ( newSuperiorDn == null )
         {
             String msg = "Cannot process a move to a null newSuperior";
-            LOG.debug( msg );
+            
+            if ( LOG.isDebugEnabled() )
+            {
+                LOG.debug( msg );
+            }
+            
             throw new IllegalArgumentException( msg );
         }
 
@@ -3002,14 +3163,24 @@ public class LdapNetworkConnection extends AbstractLdapConnection implements Lda
         if ( entryDn == null )
         {
             String msg = "Cannot process a move of a null Dn";
-            LOG.debug( msg );
+
+            if ( LOG.isDebugEnabled() )
+            {
+                LOG.debug( msg );
+            }
+            
             throw new IllegalArgumentException( msg );
         }
 
         if ( newSuperiorDn == null )
         {
             String msg = "Cannot process a move to a null newSuperior";
-            LOG.debug( msg );
+
+            if ( LOG.isDebugEnabled() )
+            {
+                LOG.debug( msg );
+            }
+            
             throw new IllegalArgumentException( msg );
         }
 
@@ -3115,7 +3286,12 @@ public class LdapNetworkConnection extends AbstractLdapConnection implements Lda
         if ( modDnRequest == null )
         {
             String msg = "Cannot process a null modDnRequest";
-            LOG.debug( msg );
+
+            if ( LOG.isDebugEnabled() )
+            {
+                LOG.debug( msg );
+            }
+            
             throw new IllegalArgumentException( msg );
         }
 
@@ -3183,21 +3359,36 @@ public class LdapNetworkConnection extends AbstractLdapConnection implements Lda
         if ( modDnRequest == null )
         {
             String msg = "Cannot process a null modDnRequest";
-            LOG.debug( msg );
+
+            if ( LOG.isDebugEnabled() )
+            {
+                LOG.debug( msg );
+            }
+            
             throw new IllegalArgumentException( msg );
         }
 
         if ( modDnRequest.getName() == null )
         {
             String msg = "Cannot process a modifyRequest which DN is null";
-            LOG.debug( msg );
+
+            if ( LOG.isDebugEnabled() )
+            {
+                LOG.debug( msg );
+            }
+            
             throw new IllegalArgumentException( msg );
         }
 
         if ( ( modDnRequest.getNewSuperior() == null ) && ( modDnRequest.getNewRdn() == null ) )
         {
             String msg = "Cannot process a modifyRequest which new superior and new Rdn are null";
-            LOG.debug( msg );
+
+            if ( LOG.isDebugEnabled() )
+            {
+                LOG.debug( msg );
+            }
+            
             throw new IllegalArgumentException( msg );
         }
 
@@ -3321,7 +3512,12 @@ public class LdapNetworkConnection extends AbstractLdapConnection implements Lda
         if ( deleteRequest == null )
         {
             String msg = "Cannot process a null deleteRequest";
-            LOG.debug( msg );
+
+            if ( LOG.isDebugEnabled() )
+            {
+                LOG.debug( msg );
+            }
+            
             throw new IllegalArgumentException( msg );
         }
 
@@ -3389,14 +3585,24 @@ public class LdapNetworkConnection extends AbstractLdapConnection implements Lda
         if ( deleteRequest == null )
         {
             String msg = "Cannot process a null deleteRequest";
-            LOG.debug( msg );
+
+            if ( LOG.isDebugEnabled() )
+            {
+                LOG.debug( msg );
+            }
+            
             throw new IllegalArgumentException( msg );
         }
 
         if ( deleteRequest.getName() == null )
         {
             String msg = "Cannot process a deleteRequest which DN is null";
-            LOG.debug( msg );
+
+            if ( LOG.isDebugEnabled() )
+            {
+                LOG.debug( msg );
+            }
+            
             throw new IllegalArgumentException( msg );
         }
 
@@ -3518,7 +3724,12 @@ public class LdapNetworkConnection extends AbstractLdapConnection implements Lda
         if ( compareRequest == null )
         {
             String msg = "Cannot process a null compareRequest";
-            LOG.debug( msg );
+
+            if ( LOG.isDebugEnabled() )
+            {
+                LOG.debug( msg );
+            }
+            
             throw new IllegalArgumentException( msg );
         }
 
@@ -3586,14 +3797,24 @@ public class LdapNetworkConnection extends AbstractLdapConnection implements Lda
         if ( compareRequest == null )
         {
             String msg = "Cannot process a null compareRequest";
-            LOG.debug( msg );
+
+            if ( LOG.isDebugEnabled() )
+            {
+                LOG.debug( msg );
+            }
+            
             throw new IllegalArgumentException( msg );
         }
 
         if ( compareRequest.getName() == null )
         {
             String msg = "Cannot process a compareRequest which DN is null";
-            LOG.debug( msg );
+
+            if ( LOG.isDebugEnabled() )
+            {
+                LOG.debug( msg );
+            }
+            
             throw new IllegalArgumentException( msg );
         }
 
@@ -3677,7 +3898,12 @@ public class LdapNetworkConnection extends AbstractLdapConnection implements Lda
         if ( extendedRequest == null )
         {
             String msg = "Cannot process a null extendedRequest";
-            LOG.debug( msg );
+
+            if ( LOG.isDebugEnabled() )
+            {
+                LOG.debug( msg );
+            }
+            
             throw new IllegalArgumentException( msg );
         }
 
@@ -3753,7 +3979,12 @@ public class LdapNetworkConnection extends AbstractLdapConnection implements Lda
         if ( extendedRequest == null )
         {
             String msg = "Cannot process a null extendedRequest";
-            LOG.debug( msg );
+
+            if ( LOG.isDebugEnabled() )
+            {
+                LOG.debug( msg );
+            }
+            
             throw new IllegalArgumentException( msg );
         }
 
@@ -4088,7 +4319,10 @@ public class LdapNetworkConnection extends AbstractLdapConnection implements Lda
                 registries.getObjectClassRegistry().register( oc );
             }
 
-            LOG.info( "successfully loaded the schema from file {}", schemaFile.getAbsolutePath() );
+            if ( LOG.isInfoEnabled() )
+            {
+                LOG.info( "successfully loaded the schema from file {}", schemaFile.getAbsolutePath() );
+            }
         }
         catch ( Exception e )
         {
diff --git a/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/NoVerificationTrustManager.java b/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/NoVerificationTrustManager.java
index e5c4ed0..7cd31e9 100644
--- a/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/NoVerificationTrustManager.java
+++ b/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/NoVerificationTrustManager.java
@@ -51,7 +51,10 @@ public class NoVerificationTrustManager extends X509ExtendedTrustManager
     public void checkClientTrusted( X509Certificate[] x509Certificates, String authType, Socket socket )
         throws CertificateException 
     {
-        LOG.debug( "checkClientTrusted {}", x509Certificates[0] );
+        if ( LOG.isDebugEnabled() )
+        {
+            LOG.debug( "checkClientTrusted {}", x509Certificates[0] );
+        }
     }
 
     
@@ -62,14 +65,20 @@ public class NoVerificationTrustManager extends X509ExtendedTrustManager
     public void checkClientTrusted( X509Certificate[] x509Certificates, String authType, SSLEngine engine )
         throws CertificateException 
     {
-        LOG.debug( "checkClientTrusted {}", x509Certificates[0] );
+        if ( LOG.isDebugEnabled() )
+        {
+            LOG.debug( "checkClientTrusted {}", x509Certificates[0] );
+        }
     }
     
     
     public void checkServerTrusted( X509Certificate[] x509Certificates, String authType, Socket socket )
         throws CertificateException 
     {
-        LOG.debug( "checkServerTrusted {}", x509Certificates[0] );
+        if ( LOG.isDebugEnabled() )
+        {
+            LOG.debug( "checkServerTrusted {}", x509Certificates[0] );
+        }
     }
 
     /**
@@ -79,7 +88,10 @@ public class NoVerificationTrustManager extends X509ExtendedTrustManager
     public void checkServerTrusted( X509Certificate[] x509Certificates, String authType, SSLEngine engine )
         throws CertificateException 
     {
-        LOG.debug( "checkServerTrusted {}", x509Certificates[0] );
+        if ( LOG.isDebugEnabled() )
+        {
+            LOG.debug( "checkServerTrusted {}", x509Certificates[0] );
+        }
     }
 
 
@@ -89,7 +101,10 @@ public class NoVerificationTrustManager extends X509ExtendedTrustManager
     @Override
     public void checkClientTrusted( X509Certificate[] x509Certificates, String s ) throws CertificateException
     {
-        LOG.debug( "checkClientTrusted {}", x509Certificates[0] );
+        if ( LOG.isDebugEnabled() )
+        {
+            LOG.debug( "checkClientTrusted {}", x509Certificates[0] );
+        }
     }
 
 
@@ -99,7 +114,10 @@ public class NoVerificationTrustManager extends X509ExtendedTrustManager
     @Override
     public void checkServerTrusted( X509Certificate[] x509Certificates, String s ) throws CertificateException
     {
-        LOG.debug( "checkServerTrusted {}", x509Certificates[0] );
+        if ( LOG.isDebugEnabled() )
+        {
+            LOG.debug( "checkServerTrusted {}", x509Certificates[0] );
+        }
     }
 
 
diff --git a/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/SearchCursorImpl.java b/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/SearchCursorImpl.java
index bb80019..051feda 100644
--- a/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/SearchCursorImpl.java
+++ b/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/SearchCursorImpl.java
@@ -57,9 +57,6 @@ public class SearchCursorImpl extends AbstractCursor<Response> implements Search
     /** A dedicated log for cursors */
     private static final Logger LOG_CURSOR = LoggerFactory.getLogger( Loggers.CURSOR_LOG.getName() );
 
-    /** Speedup for logs */
-    private static final boolean IS_DEBUG = LOG_CURSOR.isDebugEnabled();
-
     /** the search future */
     private SearchFuture future;
 
@@ -88,7 +85,7 @@ public class SearchCursorImpl extends AbstractCursor<Response> implements Search
      */
     public SearchCursorImpl( SearchFuture future, long timeout, TimeUnit timeUnit )
     {
-        if ( IS_DEBUG )
+        if ( LOG_CURSOR.isDebugEnabled() )
         {
             LOG_CURSOR.debug( "Creating SearchCursorImpl {}", this );
         }
@@ -204,7 +201,7 @@ public class SearchCursorImpl extends AbstractCursor<Response> implements Search
     @Override
     public void close() throws IOException
     {
-        if ( IS_DEBUG )
+        if ( LOG_CURSOR.isDebugEnabled() )
         {
             LOG_CURSOR.debug( "Closing SearchCursorImpl {}", this );
         }
@@ -219,7 +216,7 @@ public class SearchCursorImpl extends AbstractCursor<Response> implements Search
     @Override
     public void close( Exception cause ) throws IOException
     {
-        if ( IS_DEBUG )
+        if ( LOG_CURSOR.isDebugEnabled() )
         {
             LOG_CURSOR.debug( "Closing SearchCursorImpl {}", this );
         }
diff --git a/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/ValidatingPoolableLdapConnectionFactory.java b/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/ValidatingPoolableLdapConnectionFactory.java
index 99a66e9..b75114e 100644
--- a/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/ValidatingPoolableLdapConnectionFactory.java
+++ b/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/ValidatingPoolableLdapConnectionFactory.java
@@ -111,7 +111,11 @@ public class ValidatingPoolableLdapConnectionFactory extends AbstractPoolableLda
     @Override
     public void activateObject( LdapConnection connection ) throws LdapException
     {
-        LOG.debug( "Activating {}", connection );
+        if ( LOG.isDebugEnabled() )
+        {
+            LOG.debug( "Activating {}", connection );
+        }
+        
         super.activateObject( connection );
 
         // clear the monitors
@@ -130,7 +134,11 @@ public class ValidatingPoolableLdapConnectionFactory extends AbstractPoolableLda
     @Override
     public MonitoringLdapConnection makeObject() throws LdapException
     {
-        LOG.debug( "Creating a LDAP connection" );
+        if ( LOG.isDebugEnabled() )
+        {
+            LOG.debug( "Creating a LDAP connection" );
+        }
+        
         return new MonitoringLdapConnection( connectionFactory.newLdapConnection() );
     }
 
@@ -146,17 +154,28 @@ public class ValidatingPoolableLdapConnectionFactory extends AbstractPoolableLda
     @Override
     public void passivateObject( LdapConnection connection ) throws LdapException
     {
-        LOG.debug( "Passivating {}", connection );
+        if ( LOG.isDebugEnabled() )
+        {
+            LOG.debug( "Passivating {}", connection );
+        }
 
         if ( !connection.isConnected() || !connection.isAuthenticated()
             || ( ( MonitoringLdapConnection ) connection ).bindCalled() )
         {
-            LOG.debug( "rebind due to bind on connection {}", connection );
+            if ( LOG.isDebugEnabled() )
+            {
+                LOG.debug( "rebind due to bind on connection {}", connection );
+            }
+            
             connectionFactory.bindConnection( connection );
         }
         if ( ( ( MonitoringLdapConnection ) connection ).startTlsCalled() )
         {
-            LOG.debug( "unbind/rebind due to startTls on {}", connection );
+            if ( LOG.isDebugEnabled() )
+            {
+                LOG.debug( "unbind/rebind due to startTls on {}", connection );
+            }
+            
             // unbind to clear the tls
             connection.unBind();
             connectionFactory.bindConnection( connection );
diff --git a/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/callback/SaslCallbackHandler.java b/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/callback/SaslCallbackHandler.java
index 0001487..4744e41 100644
--- a/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/callback/SaslCallbackHandler.java
+++ b/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/callback/SaslCallbackHandler.java
@@ -76,14 +76,23 @@ public class SaslCallbackHandler implements CallbackHandler
                 NameCallback ncb = ( NameCallback ) cb;
 
                 String name = saslReq.getUsername();
-                LOG.debug( "sending name {} in the NameCallback", name );
+                
+                if ( LOG.isDebugEnabled() )
+                {
+                    LOG.debug( "sending name {} in the NameCallback", name );
+                }
+                
                 ncb.setName( name );
             }
             else if ( cb instanceof PasswordCallback )
             {
                 PasswordCallback pcb = ( PasswordCallback ) cb;
 
-                LOG.debug( "sending credentials in the PasswordCallback" );
+                if ( LOG.isDebugEnabled() )
+                {
+                    LOG.debug( "sending credentials in the PasswordCallback" );
+                }
+                
                 pcb.setPassword( Strings.utf8ToString( saslReq.getCredentials() ).toCharArray() );
             }
             else if ( cb instanceof RealmCallback )
@@ -92,14 +101,22 @@ public class SaslCallbackHandler implements CallbackHandler
 
                 if ( saslReq.getRealmName() != null )
                 {
-                    LOG.debug( "sending the user specified realm value {} in the RealmCallback", saslReq.getRealmName() );
+                    if ( LOG.isDebugEnabled() )
+                    {
+                        LOG.debug( "sending the user specified realm value {} in the RealmCallback", saslReq.getRealmName() );
+                    }
+                    
                     rcb.setText( saslReq.getRealmName() );
                 }
                 else
                 {
-                    LOG.debug(
-                        "No user specified relam value, sending the default realm value {} in the RealmCallback",
-                        rcb.getDefaultText() );
+                    if ( LOG.isDebugEnabled() )
+                    {
+                        LOG.debug(
+                            "No user specified relam value, sending the default realm value {} in the RealmCallback",
+                            rcb.getDefaultText() );
+                    }
+                    
                     rcb.setText( rcb.getDefaultText() );
                 }
             }
@@ -117,7 +134,11 @@ public class SaslCallbackHandler implements CallbackHandler
                     {
                         foundRealmName = true;
 
-                        LOG.debug( "sending the user specified realm value {} in the RealmChoiceCallback", realmName );
+                        if ( LOG.isDebugEnabled() )
+                        {
+                            LOG.debug( "sending the user specified realm value {} in the RealmChoiceCallback", realmName );
+                        }
+                        
                         rccb.setSelectedIndex( i );
                         break;
                     }
diff --git a/ldap/client/api/src/main/java/org/apache/directory/ldap/client/template/LdapConnectionTemplate.java b/ldap/client/api/src/main/java/org/apache/directory/ldap/client/template/LdapConnectionTemplate.java
index 7c01c68..7a45ae7 100755
--- a/ldap/client/api/src/main/java/org/apache/directory/ldap/client/template/LdapConnectionTemplate.java
+++ b/ldap/client/api/src/main/java/org/apache/directory/ldap/client/template/LdapConnectionTemplate.java
@@ -86,7 +86,11 @@ public class LdapConnectionTemplate implements LdapConnectionOperations, ModelFa
      */
     public LdapConnectionTemplate( LdapConnectionPool connectionPool )
     {
-        LOG.debug( "creating new connection template from connectionPool" );
+        if ( LOG.isDebugEnabled() )
+        {
+            LOG.debug( "creating new connection template from connectionPool" );
+        }
+        
         this.connectionPool = connectionPool;
         this.passwordPolicyRequestControl = new PasswordPolicyDecorator(
             connectionPool.getLdapApiService() );
diff --git a/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/LdapMessageGrammar.java b/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/LdapMessageGrammar.java
index e936fb5..8b8e9a6 100644
--- a/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/LdapMessageGrammar.java
+++ b/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/LdapMessageGrammar.java
@@ -152,9 +152,6 @@ public final class LdapMessageGrammar extends
     /** The logger */
     static final Logger LOG = LoggerFactory.getLogger( LdapMessageGrammar.class );
 
-    /** A speedup for logger */
-    static final boolean IS_DEBUG = LOG.isDebugEnabled();
-
     /** The instance of grammar. LdapMessageGrammar is a singleton */
     private static Grammar<LdapMessageContainer<MessageDecorator<? extends Message>>> instance =
         new LdapMessageGrammar();
diff --git a/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/controls/AddControl.java b/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/controls/AddControl.java
index 4a89e2a..3664262 100644
--- a/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/controls/AddControl.java
+++ b/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/controls/AddControl.java
@@ -49,10 +49,6 @@ public class AddControl extends GrammarAction<LdapMessageContainer<MessageDecora
     /** The logger */
     private static final Logger LOG = LoggerFactory.getLogger( AddControl.class );
 
-    /** Speedup for logs */
-    private static final boolean IS_DEBUG = LOG.isDebugEnabled();
-
-
     /**
      * Instantiates a new AddControl action.
      */
@@ -102,7 +98,7 @@ public class AddControl extends GrammarAction<LdapMessageContainer<MessageDecora
         // We can have an END transition
         container.setGrammarEndAllowed( true );
 
-        if ( IS_DEBUG )
+        if ( LOG.isDebugEnabled() )
         {
             LOG.debug( "Control OID : {}", oidValue );
         }
diff --git a/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/controls/InitControls.java b/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/controls/InitControls.java
index 97d4e9b..8f06d0e 100644
--- a/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/controls/InitControls.java
+++ b/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/controls/InitControls.java
@@ -46,10 +46,6 @@ public class InitControls extends GrammarAction<LdapMessageContainer<MessageDeco
     /** The logger */
     private static final Logger LOG = LoggerFactory.getLogger( InitControls.class );
 
-    /** Speedup for logs */
-    private static final boolean IS_DEBUG = LOG.isDebugEnabled();
-
-
     /**
      * Instantiates a new controls init action.
      */
@@ -70,14 +66,14 @@ public class InitControls extends GrammarAction<LdapMessageContainer<MessageDeco
         // The Length can be null
         if ( expectedLength != 0 )
         {
-            if ( IS_DEBUG )
+            if ( LOG.isDebugEnabled() )
             {
                 LOG.debug( "A new list of controls has been initialized" );
             }
         }
         else
         {
-            if ( IS_DEBUG )
+            if ( LOG.isDebugEnabled() )
             {
                 LOG.debug( "An empty list of controls has been initialized" );
             }
diff --git a/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/controls/StoreControlCriticality.java b/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/controls/StoreControlCriticality.java
index 582434a..c8f88a9 100644
--- a/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/controls/StoreControlCriticality.java
+++ b/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/controls/StoreControlCriticality.java
@@ -52,10 +52,6 @@ public class StoreControlCriticality extends GrammarAction<LdapMessageContainer<
     /** The logger */
     private static final Logger LOG = LoggerFactory.getLogger( StoreControlCriticality.class );
 
-    /** Speedup for logs */
-    private static final boolean IS_DEBUG = LOG.isDebugEnabled();
-
-
     /**
      * Instantiates a new StoreControlCriticality action.
      */
@@ -101,7 +97,7 @@ public class StoreControlCriticality extends GrammarAction<LdapMessageContainer<
         // We can have an END transition
         container.setGrammarEndAllowed( true );
 
-        if ( IS_DEBUG )
+        if ( LOG.isDebugEnabled() )
         {
             LOG.debug( "Control criticality : {}", control.isCritical() );
         }
diff --git a/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/controls/StoreControlValue.java b/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/controls/StoreControlValue.java
index d4d26d5..5c6d8a8 100644
--- a/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/controls/StoreControlValue.java
+++ b/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/controls/StoreControlValue.java
@@ -51,9 +51,6 @@ public class StoreControlValue extends GrammarAction<LdapMessageContainer<Messag
     /** The logger */
     private static final Logger LOG = LoggerFactory.getLogger( StoreControlValue.class );
 
-    /** Speedup for logs */
-    private static final boolean IS_DEBUG = LOG.isDebugEnabled();
-
 
     /**
      * Instantiates a new StoreControlValue action.
@@ -91,7 +88,7 @@ public class StoreControlValue extends GrammarAction<LdapMessageContainer<Messag
         // We can have an END transition
         container.setGrammarEndAllowed( true );
 
-        if ( IS_DEBUG )
+        if ( LOG.isDebugEnabled() )
         {
             LOG.debug( "Control value : " + Strings.dumpBytes( control.getValue() ) );
         }
diff --git a/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/ldapMessage/StoreMessageId.java b/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/ldapMessage/StoreMessageId.java
index 9cbd16f..21bbf9f 100644
--- a/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/ldapMessage/StoreMessageId.java
+++ b/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/ldapMessage/StoreMessageId.java
@@ -56,9 +56,6 @@ public class StoreMessageId extends GrammarAction<LdapMessageContainer<MessageDe
     /** The logger */
     private static final Logger LOG = LoggerFactory.getLogger( StoreMessageId.class );
 
-    /** Speedup for logs */
-    private static final boolean IS_DEBUG = LOG.isDebugEnabled();
-
 
     /**
      * Instantiates a new action.
@@ -95,7 +92,7 @@ public class StoreMessageId extends GrammarAction<LdapMessageContainer<MessageDe
 
             container.setMessageId( messageId );
 
-            if ( IS_DEBUG )
+            if ( LOG.isDebugEnabled() )
             {
                 LOG.debug( "Ldap Message Id has been decoded : " + messageId );
             }
diff --git a/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/ldapResult/AddReferral.java b/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/ldapResult/AddReferral.java
index 0dc7f66..39de65d 100644
--- a/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/ldapResult/AddReferral.java
+++ b/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/ldapResult/AddReferral.java
@@ -51,9 +51,6 @@ public class AddReferral extends GrammarAction<LdapMessageContainer<MessageDecor
     /** The logger */
     private static final Logger LOG = LoggerFactory.getLogger( AddReferral.class );
 
-    /** Speedup for logs */
-    private static final boolean IS_DEBUG = LOG.isDebugEnabled();
-
 
     /**
      * Instantiates a new referral action.
@@ -97,12 +94,16 @@ public class AddReferral extends GrammarAction<LdapMessageContainer<MessageDecor
             }
             else
             {
-                LOG.warn( "The Referral error message is not allowed when havind an error code no equals to REFERRAL" );
+                if ( LOG.isWarnEnabled() )
+                {
+                    LOG.warn( "The Referral error message is not allowed when havind an error code no equals to REFERRAL" );
+                }
+                
                 referral.addLdapUrl( LdapUrl.EMPTY_URL.toString() );
             }
         }
 
-        if ( IS_DEBUG )
+        if ( LOG.isDebugEnabled() )
         {
             StringBuilder sb = new StringBuilder();
             boolean isFirst = true;
@@ -121,7 +122,10 @@ public class AddReferral extends GrammarAction<LdapMessageContainer<MessageDecor
                 sb.append( url );
             }
 
-            LOG.debug( "The referral error message is set to " + sb.toString() );
+            if ( LOG.isDebugEnabled() )
+            {
+                LOG.debug( "The referral error message is set to " + sb.toString() );
+             }
         }
 
         // We can have an END transition
diff --git a/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/ldapResult/InitReferrals.java b/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/ldapResult/InitReferrals.java
index 12e411e..035a05a 100644
--- a/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/ldapResult/InitReferrals.java
+++ b/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/ldapResult/InitReferrals.java
@@ -49,10 +49,6 @@ public class InitReferrals extends GrammarAction<LdapMessageContainer<MessageDec
     /** The logger */
     private static final Logger LOG = LoggerFactory.getLogger( InitReferrals.class );
 
-    /** Speedup for logs */
-    private static final boolean IS_DEBUG = LOG.isDebugEnabled();
-
-
     /**
      * Instantiates a new init referrals action.
      */
@@ -85,7 +81,7 @@ public class InitReferrals extends GrammarAction<LdapMessageContainer<MessageDec
         Referral referral = new ReferralImpl();
         ldapResult.setReferral( referral );
 
-        if ( IS_DEBUG )
+        if ( LOG.isDebugEnabled() )
         {
             LOG.debug( "Initialising a referrals list" );
         }
diff --git a/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/ldapResult/StoreErrorMessage.java b/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/ldapResult/StoreErrorMessage.java
index 844e16a..a2d7294 100644
--- a/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/ldapResult/StoreErrorMessage.java
+++ b/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/ldapResult/StoreErrorMessage.java
@@ -49,10 +49,6 @@ public class StoreErrorMessage extends GrammarAction<LdapMessageContainer<Messag
     /** The logger */
     private static final Logger LOG = LoggerFactory.getLogger( StoreErrorMessage.class );
 
-    /** Speedup for logs */
-    private static final boolean IS_DEBUG = LOG.isDebugEnabled();
-
-
     /**
      * Instantiates a new error message action.
      */
@@ -89,7 +85,7 @@ public class StoreErrorMessage extends GrammarAction<LdapMessageContainer<Messag
         // We can have an END transition
         container.setGrammarEndAllowed( true );
 
-        if ( IS_DEBUG )
+        if ( LOG.isDebugEnabled() )
         {
             LOG.debug( "The error message is : " + errorMessage );
         }
diff --git a/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/ldapResult/StoreMatchedDN.java b/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/ldapResult/StoreMatchedDN.java
index 1aaa467..0860358 100644
--- a/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/ldapResult/StoreMatchedDN.java
+++ b/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/ldapResult/StoreMatchedDN.java
@@ -53,10 +53,6 @@ public class StoreMatchedDN extends GrammarAction<LdapMessageContainer<MessageDe
     /** The logger */
     private static final Logger LOG = LoggerFactory.getLogger( StoreMatchedDN.class );
 
-    /** Speedup for logs */
-    private static final boolean IS_DEBUG = LOG.isDebugEnabled();
-
-
     /**
      * Instantiates a new matched dn action.
      */
@@ -118,15 +114,18 @@ public class StoreMatchedDN extends GrammarAction<LdapMessageContainer<MessageDe
                     break;
 
                 default:
-                    LOG.warn( "The matched Dn should not be set when the result code is not one of NoSuchObject,"
-                        + " AliasProblem, InvalidDNSyntax or AliasDreferencingProblem" );
+                    if ( LOG.isWarnEnabled() )
+                    {
+                        LOG.warn( "The matched Dn should not be set when the result code is not one of NoSuchObject,"
+                            + " AliasProblem, InvalidDNSyntax or AliasDreferencingProblem" );
+                    }
 
                     matchedDn = Dn.EMPTY_DN;
                     break;
             }
         }
 
-        if ( IS_DEBUG )
+        if ( LOG.isDebugEnabled() )
         {
             LOG.debug( "The matchedDn is " + matchedDn );
         }
diff --git a/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/ldapResult/StoreResultCode.java b/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/ldapResult/StoreResultCode.java
index e9242fb..52a8169 100644
--- a/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/ldapResult/StoreResultCode.java
+++ b/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/ldapResult/StoreResultCode.java
@@ -52,10 +52,6 @@ public class StoreResultCode extends GrammarAction<LdapMessageContainer<MessageD
     /** The logger */
     private static final Logger LOG = LoggerFactory.getLogger( StoreResultCode.class );
 
-    /** Speedup for logs */
-    private static final boolean IS_DEBUG = LOG.isDebugEnabled();
-
-
     /**
      * Instantiates a new result code action.
      */
@@ -90,7 +86,7 @@ public class StoreResultCode extends GrammarAction<LdapMessageContainer<MessageD
             throw new DecoderException( ide.getMessage(), ide );
         }
 
-        if ( IS_DEBUG )
+        if ( LOG.isDebugEnabled() )
         {
             LOG.debug( "The result code is set to " + resultCode );
         }
diff --git a/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/request/abandon/InitAbandonRequest.java b/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/request/abandon/InitAbandonRequest.java
index 4d6394f..eba1fab 100644
--- a/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/request/abandon/InitAbandonRequest.java
+++ b/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/request/abandon/InitAbandonRequest.java
@@ -49,9 +49,6 @@ public class InitAbandonRequest extends GrammarAction<LdapMessageContainer<Aband
     /** The logger */
     private static final Logger LOG = LoggerFactory.getLogger( InitAbandonRequest.class );
 
-    /** Speedup for logs */
-    private static final boolean IS_DEBUG = LOG.isDebugEnabled();
-
 
     /**
      * Instantiates a new action.
@@ -95,11 +92,9 @@ public class InitAbandonRequest extends GrammarAction<LdapMessageContainer<Aband
 
             abandonRequest.setAbandoned( abandonnedMessageId );
 
-            if ( IS_DEBUG )
+            if ( LOG.isDebugEnabled() )
             {
-                LOG
-                    .debug( "AbandonMessage Id has been decoded : {}", Integer
-                        .valueOf( abandonnedMessageId ) );
+                LOG.debug( "AbandonMessage Id has been decoded : {}", Integer.valueOf( abandonnedMessageId ) );
             }
 
             container.setGrammarEndAllowed( true );
diff --git a/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/request/add/AddAddRequestAttributeType.java b/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/request/add/AddAddRequestAttributeType.java
index b4be070..24c4930 100644
--- a/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/request/add/AddAddRequestAttributeType.java
+++ b/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/request/add/AddAddRequestAttributeType.java
@@ -49,10 +49,6 @@ public class AddAddRequestAttributeType extends GrammarAction<LdapMessageContain
     /** The logger */
     private static final Logger LOG = LoggerFactory.getLogger( AddAddRequestAttributeType.class );
 
-    /** Speedup for logs */
-    private static final boolean IS_DEBUG = LOG.isDebugEnabled();
-
-
     /**
      * Instantiates a new action.
      */
@@ -99,7 +95,7 @@ public class AddAddRequestAttributeType extends GrammarAction<LdapMessageContain
                 addRequest.getEntry().getDn(), ne );
         }
 
-        if ( IS_DEBUG )
+        if ( LOG.isDebugEnabled() )
         {
             LOG.debug( "Adding type {}", type );
         }
diff --git a/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/request/add/AddAttributeValue.java b/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/request/add/AddAttributeValue.java
index deb4cd8..c8d5b48 100644
--- a/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/request/add/AddAttributeValue.java
+++ b/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/request/add/AddAttributeValue.java
@@ -46,10 +46,6 @@ public class AddAttributeValue extends GrammarAction<LdapMessageContainer<AddReq
     /** The logger */
     private static final Logger LOG = LoggerFactory.getLogger( AddAttributeValue.class );
 
-    /** Speedup for logs */
-    private static final boolean IS_DEBUG = LOG.isDebugEnabled();
-
-
     /**
      * Instantiates a new value action.
      */
@@ -83,7 +79,7 @@ public class AddAttributeValue extends GrammarAction<LdapMessageContainer<AddReq
                 {
                     value = tlv.getValue().getData();
 
-                    if ( IS_DEBUG )
+                    if ( LOG.isDebugEnabled() )
                     {
                         LOG.debug( "Adding value {}", Strings.dumpBytes( ( byte[] ) value ) );
                     }
@@ -94,7 +90,7 @@ public class AddAttributeValue extends GrammarAction<LdapMessageContainer<AddReq
                 {
                     value = Strings.utf8ToString( tlv.getValue().getData() );
 
-                    if ( IS_DEBUG )
+                    if ( LOG.isDebugEnabled() )
                     {
                         LOG.debug( "Adding value {}" + value );
                     }
diff --git a/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/request/add/StoreAddRequestEntryName.java b/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/request/add/StoreAddRequestEntryName.java
index 19e12e4..ed06417 100644
--- a/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/request/add/StoreAddRequestEntryName.java
+++ b/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/request/add/StoreAddRequestEntryName.java
@@ -106,6 +106,9 @@ public class StoreAddRequestEntryName extends GrammarAction<LdapMessageContainer
             addRequest.setEntryDn( entryDn );
         }
 
-        LOG.debug( "Adding an entry with Dn : {}", addRequest.getEntry() );
+        if ( LOG.isDebugEnabled() )
+        {
+            LOG.debug( "Adding an entry with Dn : {}", addRequest.getEntry() );
+        }
     }
 }
diff --git a/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/request/bind/InitSaslBind.java b/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/request/bind/InitSaslBind.java
index b9c46f6..b4c578e 100644
--- a/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/request/bind/InitSaslBind.java
+++ b/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/request/bind/InitSaslBind.java
@@ -56,10 +56,6 @@ public class InitSaslBind extends GrammarAction<LdapMessageContainer<BindRequest
     /** The logger */
     private static final Logger LOG = LoggerFactory.getLogger( InitSaslBind.class );
 
-    /** Speedup for logs */
-    private static final boolean IS_DEBUG = LOG.isDebugEnabled();
-
-
     /**
      * Instantiates a new action.
      */
@@ -91,7 +87,7 @@ public class InitSaslBind extends GrammarAction<LdapMessageContainer<BindRequest
 
         bindRequestMessage.setSimple( false );
 
-        if ( IS_DEBUG )
+        if ( LOG.isDebugEnabled() )
         {
             LOG.debug( "The SaslCredential has been created" );
         }
diff --git a/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/request/bind/StoreName.java b/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/request/bind/StoreName.java
index 0db8fc7..d24612e 100644
--- a/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/request/bind/StoreName.java
+++ b/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/request/bind/StoreName.java
@@ -46,10 +46,6 @@ public class StoreName extends GrammarAction<LdapMessageContainer<BindRequestDec
     /** The logger */
     private static final Logger LOG = LoggerFactory.getLogger( StoreName.class );
 
-    /** Speedup for logs */
-    private static final boolean IS_DEBUG = LOG.isDebugEnabled();
-
-
     /**
      * Instantiates a new action.
      */
@@ -81,7 +77,7 @@ public class StoreName extends GrammarAction<LdapMessageContainer<BindRequestDec
             bindRequestMessage.setName( nameStr );
         }
 
-        if ( IS_DEBUG )
+        if ( LOG.isDebugEnabled() )
         {
             LOG.debug( " The Bind name is {}", bindRequestMessage.getName() );
         }
diff --git a/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/request/bind/StoreSaslCredentials.java b/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/request/bind/StoreSaslCredentials.java
index c8dffba..58c91bf 100644
--- a/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/request/bind/StoreSaslCredentials.java
+++ b/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/request/bind/StoreSaslCredentials.java
@@ -45,10 +45,6 @@ public class StoreSaslCredentials extends GrammarAction<LdapMessageContainer<Bin
     /** The logger */
     private static final Logger LOG = LoggerFactory.getLogger( StoreSaslCredentials.class );
 
-    /** Speedup for logs */
-    private static final boolean IS_DEBUG = LOG.isDebugEnabled();
-
-
     /**
      * Instantiates a new action.
      */
@@ -82,7 +78,7 @@ public class StoreSaslCredentials extends GrammarAction<LdapMessageContainer<Bin
         // We can have an END transition
         container.setGrammarEndAllowed( true );
 
-        if ( IS_DEBUG )
+        if ( LOG.isDebugEnabled() )
         {
             LOG.debug( "The credentials are : {}", Strings.dumpBytes( bindRequestMessage
                 .getCredentials() ) );
diff --git a/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/request/bind/StoreSaslMechanism.java b/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/request/bind/StoreSaslMechanism.java
index 5057226..076a0aa 100644
--- a/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/request/bind/StoreSaslMechanism.java
+++ b/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/request/bind/StoreSaslMechanism.java
@@ -44,10 +44,6 @@ public class StoreSaslMechanism extends GrammarAction<LdapMessageContainer<BindR
     /** The logger */
     private static final Logger LOG = LoggerFactory.getLogger( StoreSaslMechanism.class );
 
-    /** Speedup for logs */
-    private static final boolean IS_DEBUG = LOG.isDebugEnabled();
-
-
     /**
      * Instantiates a new action.
      */
@@ -79,7 +75,7 @@ public class StoreSaslMechanism extends GrammarAction<LdapMessageContainer<BindR
         // We can have an END transition
         container.setGrammarEndAllowed( true );
 
-        if ( IS_DEBUG )
+        if ( LOG.isDebugEnabled() )
         {
             LOG.debug( "The mechanism is : {}", bindRequestMessage.getSaslMechanism() );
         }
diff --git a/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/request/bind/StoreSimpleAuth.java b/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/request/bind/StoreSimpleAuth.java
index 23567c4..b00c86e 100644
--- a/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/request/bind/StoreSimpleAuth.java
+++ b/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/request/bind/StoreSimpleAuth.java
@@ -51,10 +51,6 @@ public class StoreSimpleAuth extends GrammarAction<LdapMessageContainer<BindRequ
     /** The logger */
     private static final Logger LOG = LoggerFactory.getLogger( StoreSimpleAuth.class );
 
-    /** Speedup for logs */
-    private static final boolean IS_DEBUG = LOG.isDebugEnabled();
-
-
     /**
      * Instantiates a new action.
      */
@@ -88,7 +84,7 @@ public class StoreSimpleAuth extends GrammarAction<LdapMessageContainer<BindRequ
         // We can have an END transition
         container.setGrammarEndAllowed( true );
 
-        if ( IS_DEBUG )
+        if ( LOG.isDebugEnabled() )
         {
             LOG.debug( "The simple authentication is : {}", Strings.dumpBytes( bindRequestMessage
                 .getCredentials() ) );
diff --git a/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/request/bind/StoreVersion.java b/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/request/bind/StoreVersion.java
index 1ad2ff6..b909f48 100644
--- a/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/request/bind/StoreVersion.java
+++ b/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/request/bind/StoreVersion.java
@@ -49,10 +49,6 @@ public class StoreVersion extends GrammarAction<LdapMessageContainer<BindRequest
     /** The logger */
     private static final Logger LOG = LoggerFactory.getLogger( StoreVersion.class );
 
-    /** Speedup for logs */
-    private static final boolean IS_DEBUG = LOG.isDebugEnabled();
-
-
     /**
      * Instantiates a new action.
      */
@@ -79,7 +75,7 @@ public class StoreVersion extends GrammarAction<LdapMessageContainer<BindRequest
         {
             int version = IntegerDecoder.parse( value, 1, 127 );
 
-            if ( IS_DEBUG )
+            if ( LOG.isDebugEnabled() )
             {
                 LOG.debug( "Ldap version ", Integer.valueOf( version ) );
             }
diff --git a/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/request/compare/InitCompareRequest.java b/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/request/compare/InitCompareRequest.java
index b7993e4..938864c 100644
--- a/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/request/compare/InitCompareRequest.java
+++ b/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/request/compare/InitCompareRequest.java
@@ -66,6 +66,9 @@ public class InitCompareRequest extends GrammarAction<LdapMessageContainer<Compa
             container.getLdapCodecService(), internalCompareRequest );
         container.setMessage( compareRequest );
 
-        LOG.debug( "Compare Request" );
+        if ( LOG.isDebugEnabled() )
+        {
+            LOG.debug( "Compare Request" );
+        }
     }
 }
diff --git a/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/request/compare/StoreCompareRequestAssertionValue.java b/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/request/compare/StoreCompareRequestAssertionValue.java
index 5e1a986..f078530 100644
--- a/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/request/compare/StoreCompareRequestAssertionValue.java
+++ b/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/request/compare/StoreCompareRequestAssertionValue.java
@@ -50,10 +50,6 @@ public class StoreCompareRequestAssertionValue extends GrammarAction<LdapMessage
     /** The logger */
     private static final Logger LOG = LoggerFactory.getLogger( StoreCompareRequestAssertionValue.class );
 
-    /** Speedup for logs */
-    private static final boolean IS_DEBUG = LOG.isDebugEnabled();
-
-
     /**
      * Instantiates a new action.
      */
@@ -85,7 +81,7 @@ public class StoreCompareRequestAssertionValue extends GrammarAction<LdapMessage
             {
                 compareRequest.setAssertionValue( tlv.getValue().getData() );
 
-                if ( IS_DEBUG )
+                if ( LOG.isDebugEnabled() )
                 {
                     LOG.debug( "Comparing attribute value {}", Strings.dumpBytes( compareRequest
                         .getAssertionValue().getBytes() ) );
diff --git a/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/request/compare/StoreCompareRequestAttributeDesc.java b/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/request/compare/StoreCompareRequestAttributeDesc.java
index d8a5dc0..aa1e415 100644
--- a/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/request/compare/StoreCompareRequestAttributeDesc.java
+++ b/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/request/compare/StoreCompareRequestAttributeDesc.java
@@ -53,10 +53,6 @@ public class StoreCompareRequestAttributeDesc extends GrammarAction<LdapMessageC
     /** The logger */
     private static final Logger LOG = LoggerFactory.getLogger( StoreCompareRequestAttributeDesc.class );
 
-    /** Speedup for logs */
-    private static final boolean IS_DEBUG = LOG.isDebugEnabled();
-
-
     /**
      * Instantiates a new action.
      */
@@ -92,7 +88,7 @@ public class StoreCompareRequestAttributeDesc extends GrammarAction<LdapMessageC
         String type = Strings.utf8ToString( tlv.getValue().getData() );
         compareRequest.setAttributeId( type );
 
-        if ( IS_DEBUG )
+        if ( LOG.isDebugEnabled() )
         {
             LOG.debug( "Comparing attribute description {}", compareRequest.getAttributeId() );
         }
diff --git a/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/request/compare/StoreCompareRequestEntryName.java b/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/request/compare/StoreCompareRequestEntryName.java
index af1e89b..5093b98 100644
--- a/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/request/compare/StoreCompareRequestEntryName.java
+++ b/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/request/compare/StoreCompareRequestEntryName.java
@@ -51,10 +51,6 @@ public class StoreCompareRequestEntryName extends GrammarAction<LdapMessageConta
     /** The logger */
     private static final Logger LOG = LoggerFactory.getLogger( StoreCompareRequestEntryName.class );
 
-    /** Speedup for logs */
-    private static final boolean IS_DEBUG = LOG.isDebugEnabled();
-
-
     /**
      * Instantiates a new action.
      */
@@ -105,7 +101,7 @@ public class StoreCompareRequestEntryName extends GrammarAction<LdapMessageConta
             compareRequest.setName( entry );
         }
 
-        if ( IS_DEBUG )
+        if ( LOG.isDebugEnabled() )
         {
             LOG.debug( "Comparing Dn {}", entry );
         }
diff --git a/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/request/del/InitDelRequest.java b/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/request/del/InitDelRequest.java
index 67dde0e..9575f02 100644
--- a/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/request/del/InitDelRequest.java
+++ b/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/request/del/InitDelRequest.java
@@ -53,10 +53,6 @@ public class InitDelRequest extends GrammarAction<LdapMessageContainer<DeleteReq
     /** The logger */
     private static final Logger LOG = LoggerFactory.getLogger( InitDelRequest.class );
 
-    /** Speedup for logs */
-    private static final boolean IS_DEBUG = LOG.isDebugEnabled();
-
-
     /**
      * Instantiates a new action.
      */
@@ -117,7 +113,7 @@ public class InitDelRequest extends GrammarAction<LdapMessageContainer<DeleteReq
         // We can have an END transition
         container.setGrammarEndAllowed( true );
 
-        if ( IS_DEBUG )
+        if ( LOG.isDebugEnabled() )
         {
             LOG.debug( "Deleting Dn {}", entry );
         }
diff --git a/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/request/extended/InitExtendedRequest.java b/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/request/extended/InitExtendedRequest.java
index 5d85946..f8e2813 100644
--- a/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/request/extended/InitExtendedRequest.java
+++ b/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/request/extended/InitExtendedRequest.java
@@ -68,6 +68,9 @@ public class InitExtendedRequest extends GrammarAction<LdapMessageContainer<Exte
          * OID before we can delegate instantiation to the LdapCodecService.
          */
 
-        LOG.debug( "Extended request being processed ..." );
+        if ( LOG.isDebugEnabled() )
+        {
+            LOG.debug( "Extended request being processed ..." );
+        }
     }
 }
diff --git a/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/request/extended/StoreExtendedRequestName.java b/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/request/extended/StoreExtendedRequestName.java
index 269a0327..5ed55e0 100644
--- a/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/request/extended/StoreExtendedRequestName.java
+++ b/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/request/extended/StoreExtendedRequestName.java
@@ -48,10 +48,6 @@ public class StoreExtendedRequestName extends GrammarAction<LdapMessageContainer
     /** The logger */
     private static final Logger LOG = LoggerFactory.getLogger( StoreExtendedRequestName.class );
 
-    /** Speedup for logs */
-    private static final boolean IS_DEBUG = LOG.isDebugEnabled();
-
-
     /**
      * Instantiates a new action.
      */
@@ -119,7 +115,7 @@ public class StoreExtendedRequestName extends GrammarAction<LdapMessageContainer
         // We can have an END transition
         container.setGrammarEndAllowed( true );
 
-        if ( IS_DEBUG )
+        if ( LOG.isDebugEnabled() )
         {
             LOG.debug( "OID read : {}", req.getRequestName() );
         }
diff --git a/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/request/extended/StoreExtendedRequestValue.java b/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/request/extended/StoreExtendedRequestValue.java
index 5cebf53..9e19a17 100644
--- a/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/request/extended/StoreExtendedRequestValue.java
+++ b/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/request/extended/StoreExtendedRequestValue.java
@@ -44,10 +44,6 @@ public class StoreExtendedRequestValue extends GrammarAction<LdapMessageContaine
     /** The logger */
     private static final Logger LOG = LoggerFactory.getLogger( StoreExtendedRequestValue.class );
 
-    /** Speedup for logs */
-    private static final boolean IS_DEBUG = LOG.isDebugEnabled();
-
-
     /**
      * Instantiates a new action.
      */
@@ -82,7 +78,7 @@ public class StoreExtendedRequestValue extends GrammarAction<LdapMessageContaine
         // We can have an END transition
         container.setGrammarEndAllowed( true );
 
-        if ( IS_DEBUG )
+        if ( LOG.isDebugEnabled() )
         {
             LOG.debug( "Extended value : {}", extendedRequest.getRequestValue() );
         }
diff --git a/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/request/modify/AddModifyRequestAttribute.java b/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/request/modify/AddModifyRequestAttribute.java
index 2aeb6af..2bc46ff 100644
--- a/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/request/modify/AddModifyRequestAttribute.java
+++ b/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/request/modify/AddModifyRequestAttribute.java
@@ -55,10 +55,6 @@ public class AddModifyRequestAttribute extends GrammarAction<LdapMessageContaine
     /** The logger */
     private static final Logger LOG = LoggerFactory.getLogger( AddModifyRequestAttribute.class );
 
-    /** Speedup for logs */
-    private static final boolean IS_DEBUG = LOG.isDebugEnabled();
-
-
     /**
      * Instantiates a new action.
      */
@@ -96,7 +92,7 @@ public class AddModifyRequestAttribute extends GrammarAction<LdapMessageContaine
             modifyRequestDecorator.addAttributeTypeAndValues( type );
         }
 
-        if ( IS_DEBUG )
+        if ( LOG.isDebugEnabled() )
         {
             LOG.debug( "Modifying type : {}", type );
         }
diff --git a/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/request/modify/InitAttributeVals.java b/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/request/modify/InitAttributeVals.java
index 4771761..b160c47 100644
--- a/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/request/modify/InitAttributeVals.java
+++ b/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/request/modify/InitAttributeVals.java
@@ -66,7 +66,7 @@ public class InitAttributeVals extends GrammarAction<LdapMessageContainer<Modify
         TLV tlv = container.getCurrentTLV();
 
         // If the length is null, we store an empty value
-        if ( tlv.getLength() == 0 )
+        if ( LOG.isDebugEnabled() && ( tlv.getLength() == 0 ) )
         {
             LOG.debug( "No vals for this attribute" );
         }
@@ -74,6 +74,9 @@ public class InitAttributeVals extends GrammarAction<LdapMessageContainer<Modify
         // We can have an END transition
         container.setGrammarEndAllowed( true );
 
-        LOG.debug( "Some vals are to be decoded" );
+        if ( LOG.isDebugEnabled() )
+        {
+            LOG.debug( "Some vals are to be decoded" );
+        }
     }
 }
diff --git a/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/request/modify/StoreModifyRequestAttributeValue.java b/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/request/modify/StoreModifyRequestAttributeValue.java
index a7f3e6a..870d93a 100644
--- a/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/request/modify/StoreModifyRequestAttributeValue.java
+++ b/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/request/modify/StoreModifyRequestAttributeValue.java
@@ -40,10 +40,6 @@ public class StoreModifyRequestAttributeValue extends GrammarAction<LdapMessageC
     /** The logger */
     private static final Logger LOG = LoggerFactory.getLogger( StoreModifyRequestAttributeValue.class );
 
-    /** Speedup for logs */
-    private static final boolean IS_DEBUG = LOG.isDebugEnabled();
-
-
     /**
      * Instantiates a new modify attribute value action.
      */
@@ -93,7 +89,7 @@ public class StoreModifyRequestAttributeValue extends GrammarAction<LdapMessageC
         // We can have an END transition
         container.setGrammarEndAllowed( true );
 
-        if ( IS_DEBUG )
+        if ( LOG.isDebugEnabled() )
         {
             LOG.debug( "Value modified : {}", value );
         }
diff --git a/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/request/modify/StoreModifyRequestObjectName.java b/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/request/modify/StoreModifyRequestObjectName.java
index 4037d2b..ab223a4 100644
--- a/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/request/modify/StoreModifyRequestObjectName.java
+++ b/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/request/modify/StoreModifyRequestObjectName.java
@@ -50,10 +50,6 @@ public class StoreModifyRequestObjectName extends GrammarAction<LdapMessageConta
     /** The logger */
     private static final Logger LOG = LoggerFactory.getLogger( StoreModifyRequestObjectName.class );
 
-    /** Speedup for logs */
-    private static final boolean IS_DEBUG = LOG.isDebugEnabled();
-
-
     /**
      * Instantiates a new action.
      */
@@ -103,7 +99,7 @@ public class StoreModifyRequestObjectName extends GrammarAction<LdapMessageConta
             modifyRequest.setName( object );
         }
 
-        if ( IS_DEBUG )
+        if ( LOG.isDebugEnabled() )
         {
             LOG.debug( "Modification of Dn {}", modifyRequest.getName() );
         }
diff --git a/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/request/modify/StoreOperationType.java b/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/request/modify/StoreOperationType.java
index 9d963b1..7190627 100644
--- a/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/request/modify/StoreOperationType.java
+++ b/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/request/modify/StoreOperationType.java
@@ -50,10 +50,6 @@ public class StoreOperationType extends GrammarAction<LdapMessageContainer<Modif
     /** The logger */
     private static final Logger LOG = LoggerFactory.getLogger( StoreOperationType.class );
 
-    /** Speedup for logs */
-    private static final boolean IS_DEBUG = LOG.isDebugEnabled();
-
-
     /**
      * Instantiates a new action.
      */
@@ -91,7 +87,7 @@ public class StoreOperationType extends GrammarAction<LdapMessageContainer<Modif
         // Store the current operation.
         modifyRequestDecorator.setCurrentOperation( operation );
 
-        if ( IS_DEBUG )
+        if ( LOG.isDebugEnabled() )
         {
             switch ( operation )
             {
diff --git a/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/request/modifydn/InitModifyDnRequest.java b/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/request/modifydn/InitModifyDnRequest.java
index 8bc822a..457255a 100644
--- a/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/request/modifydn/InitModifyDnRequest.java
+++ b/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/request/modifydn/InitModifyDnRequest.java
@@ -64,6 +64,9 @@ public class InitModifyDnRequest extends GrammarAction<LdapMessageContainer<Modi
             container.getLdapCodecService(), internalModifyDnRequest );
         container.setMessage( modifyDnRequest );
 
-        LOG.debug( "ModifyDn request" );
+        if ( LOG.isDebugEnabled() )
+        {
+            LOG.debug( "ModifyDn request" );
+        }
     }
 }
diff --git a/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/request/modifydn/StoreModifyDnRequestDeleteOldRdn.java b/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/request/modifydn/StoreModifyDnRequestDeleteOldRdn.java
index a0b1b56..0cb5776 100644
--- a/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/request/modifydn/StoreModifyDnRequestDeleteOldRdn.java
+++ b/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/request/modifydn/StoreModifyDnRequestDeleteOldRdn.java
@@ -50,10 +50,6 @@ public class StoreModifyDnRequestDeleteOldRdn extends GrammarAction<LdapMessageC
     /** The logger */
     private static final Logger LOG = LoggerFactory.getLogger( StoreModifyDnRequestDeleteOldRdn.class );
 
-    /** Speedup for logs */
-    private static final boolean IS_DEBUG = LOG.isDebugEnabled();
-
-
     /**
      * Instantiates a new action.
      */
@@ -96,7 +92,7 @@ public class StoreModifyDnRequestDeleteOldRdn extends GrammarAction<LdapMessageC
         // We can have an END transition
         container.setGrammarEndAllowed( true );
 
-        if ( IS_DEBUG )
+        if ( LOG.isDebugEnabled() )
         {
             if ( modifyDnRequest.getDeleteOldRdn() )
             {
diff --git a/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/request/modifydn/StoreModifyDnRequestEntryName.java b/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/request/modifydn/StoreModifyDnRequestEntryName.java
index 684ed93..562559d 100644
--- a/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/request/modifydn/StoreModifyDnRequestEntryName.java
+++ b/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/request/modifydn/StoreModifyDnRequestEntryName.java
@@ -51,10 +51,6 @@ public class StoreModifyDnRequestEntryName extends GrammarAction<LdapMessageCont
     /** The logger */
     private static final Logger LOG = LoggerFactory.getLogger( StoreModifyDnRequestEntryName.class );
 
-    /** Speedup for logs */
-    private static final boolean IS_DEBUG = LOG.isDebugEnabled();
-
-
     /**
      * Instantiates a new action.
      */
@@ -106,7 +102,7 @@ public class StoreModifyDnRequestEntryName extends GrammarAction<LdapMessageCont
             modifyDnRequest.setName( entry );
         }
 
-        if ( IS_DEBUG )
+        if ( LOG.isDebugEnabled() )
         {
             LOG.debug( "Modifying Dn {}", entry );
         }
diff --git a/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/request/modifydn/StoreModifyDnRequestNewRdn.java b/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/request/modifydn/StoreModifyDnRequestNewRdn.java
index 621f01f..2a93da5 100644
--- a/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/request/modifydn/StoreModifyDnRequestNewRdn.java
+++ b/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/request/modifydn/StoreModifyDnRequestNewRdn.java
@@ -55,10 +55,6 @@ public class StoreModifyDnRequestNewRdn extends GrammarAction<LdapMessageContain
     /** The logger */
     private static final Logger LOG = LoggerFactory.getLogger( StoreModifyDnRequestNewRdn.class );
 
-    /** Speedup for logs */
-    private static final boolean IS_DEBUG = LOG.isDebugEnabled();
-
-
     /**
      * Instantiates a new action.
      */
@@ -115,7 +111,7 @@ public class StoreModifyDnRequestNewRdn extends GrammarAction<LdapMessageContain
             modifyDnRequest.setNewRdn( newRdn );
         }
 
-        if ( IS_DEBUG )
+        if ( LOG.isDebugEnabled() )
         {
             LOG.debug( "Modifying with new Rdn {}", newRdn );
         }
diff --git a/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/request/modifydn/StoreModifyDnRequestNewSuperior.java b/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/request/modifydn/StoreModifyDnRequestNewSuperior.java
index f251429..0559143 100644
--- a/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/request/modifydn/StoreModifyDnRequestNewSuperior.java
+++ b/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/request/modifydn/StoreModifyDnRequestNewSuperior.java
@@ -51,10 +51,6 @@ public class StoreModifyDnRequestNewSuperior extends GrammarAction<LdapMessageCo
     /** The logger */
     private static final Logger LOG = LoggerFactory.getLogger( StoreModifyDnRequestNewSuperior.class );
 
-    /** Speedup for logs */
-    private static final boolean IS_DEBUG = LOG.isDebugEnabled();
-
-
     /**
      * Instantiates a new action.
      */
@@ -88,7 +84,10 @@ public class StoreModifyDnRequestNewSuperior extends GrammarAction<LdapMessageCo
             }
             else
             {
-                LOG.warn( "The new superior is null, so we will change the entry" );
+                if ( LOG.isWarnEnabled() )
+                {
+                    LOG.warn( "The new superior is null, so we will change the entry" );
+                }
             }
 
             modifyDnRequest.setNewSuperior( newSuperior );
@@ -119,7 +118,7 @@ public class StoreModifyDnRequestNewSuperior extends GrammarAction<LdapMessageCo
         // We can have an END transition
         container.setGrammarEndAllowed( true );
 
-        if ( IS_DEBUG )
+        if ( LOG.isDebugEnabled() )
         {
             LOG.debug( "New superior Dn {}", newSuperior );
         }
diff --git a/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/request/search/InitSearchRequest.java b/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/request/search/InitSearchRequest.java
index cbf16a7..7359c00 100644
--- a/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/request/search/InitSearchRequest.java
+++ b/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/request/search/InitSearchRequest.java
@@ -69,6 +69,9 @@ public class InitSearchRequest extends GrammarAction<LdapMessageContainer<Search
         searchRequest.setTlvId( tlv.getId() );
         container.setMessage( searchRequest );
 
-        LOG.debug( "Search Request" );
+        if ( LOG.isDebugEnabled() )
+        {
+            LOG.debug( "Search Request" );
+        }
     }
 }
diff --git a/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/request/search/InitSearchRequestAttributeDescList.java b/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/request/search/InitSearchRequestAttributeDescList.java
index aad7d11..ee22c24 100644
--- a/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/request/search/InitSearchRequestAttributeDescList.java
+++ b/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/request/search/InitSearchRequestAttributeDescList.java
@@ -48,10 +48,6 @@ public class InitSearchRequestAttributeDescList extends GrammarAction<LdapMessag
     /** The logger */
     private static final Logger LOG = LoggerFactory.getLogger( InitSearchRequestAttributeDescList.class );
 
-    /** Speedup for logs */
-    private static final boolean IS_DEBUG = LOG.isDebugEnabled();
-
-
     /**
      * Instantiates a new init attribute desc list action.
      */
@@ -82,7 +78,7 @@ public class InitSearchRequestAttributeDescList extends GrammarAction<LdapMessag
         // We can have an END transition
         container.setGrammarEndAllowed( true );
 
-        if ( IS_DEBUG )
+        if ( LOG.isDebugEnabled() )
         {
             LOG.debug( "Initialize AttributeDesc list" );
         }
diff --git a/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/request/search/StoreSearchRequestAttributeDesc.java b/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/request/search/StoreSearchRequestAttributeDesc.java
index 5bc971f..7cc8ea0 100644
--- a/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/request/search/StoreSearchRequestAttributeDesc.java
+++ b/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/request/search/StoreSearchRequestAttributeDesc.java
@@ -47,10 +47,6 @@ public class StoreSearchRequestAttributeDesc extends GrammarAction<LdapMessageCo
     /** The logger */
     private static final Logger LOG = LoggerFactory.getLogger( StoreSearchRequestAttributeDesc.class );
 
-    /** Speedup for logs */
-    private static final boolean IS_DEBUG = LOG.isDebugEnabled();
-
-
     /**
      * Instantiates a new attribute desc action.
      */
@@ -83,7 +79,7 @@ public class StoreSearchRequestAttributeDesc extends GrammarAction<LdapMessageCo
         // We can have an END transition
         container.setGrammarEndAllowed( true );
 
-        if ( IS_DEBUG )
+        if ( LOG.isDebugEnabled() )
         {
             LOG.debug( "Decoded Attribute Description : {}", attributeDescription );
         }
diff --git a/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/request/search/StoreSearchRequestBaseObject.java b/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/request/search/StoreSearchRequestBaseObject.java
index 180186b..8af47f6 100644
--- a/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/request/search/StoreSearchRequestBaseObject.java
+++ b/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/request/search/StoreSearchRequestBaseObject.java
@@ -104,6 +104,9 @@ public class StoreSearchRequestBaseObject extends GrammarAction<LdapMessageConta
 
         searchRequest.setBase( baseObject );
 
-        LOG.debug( "Searching with root Dn : {}", baseObject );
+        if ( LOG.isDebugEnabled() )
+        {
+            LOG.debug( "Searching with root Dn : {}", baseObject );
+        }
     }
 }
diff --git a/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/request/search/StoreSearchRequestDerefAlias.java b/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/request/search/StoreSearchRequestDerefAlias.java
index 697ab21..851f260 100644
--- a/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/request/search/StoreSearchRequestDerefAlias.java
+++ b/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/request/search/StoreSearchRequestDerefAlias.java
@@ -55,10 +55,6 @@ public class StoreSearchRequestDerefAlias extends GrammarAction<LdapMessageConta
     /** The logger */
     private static final Logger LOG = LoggerFactory.getLogger( StoreSearchRequestDerefAlias.class );
 
-    /** Speedup for logs */
-    private static final boolean IS_DEBUG = LOG.isDebugEnabled();
-
-
     /**
      * Instantiates a new action.
      */
@@ -95,7 +91,7 @@ public class StoreSearchRequestDerefAlias extends GrammarAction<LdapMessageConta
 
         searchRequest.setDerefAliases( AliasDerefMode.getDerefMode( derefAliases ) );
 
-        if ( IS_DEBUG )
+        if ( LOG.isDebugEnabled() )
         {
             switch ( derefAliases )
             {
diff --git a/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/request/search/StoreSearchRequestScope.java b/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/request/search/StoreSearchRequestScope.java
index 04ad746..01c2e02 100644
--- a/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/request/search/StoreSearchRequestScope.java
+++ b/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/request/search/StoreSearchRequestScope.java
@@ -54,10 +54,6 @@ public class StoreSearchRequestScope extends GrammarAction<LdapMessageContainer<
     /** The logger */
     private static final Logger LOG = LoggerFactory.getLogger( StoreSearchRequestScope.class );
 
-    /** Speedup for logs */
-    private static final boolean IS_DEBUG = LOG.isDebugEnabled();
-
-
     /**
      * Instantiates a new action.
      */
@@ -94,7 +90,7 @@ public class StoreSearchRequestScope extends GrammarAction<LdapMessageContainer<
 
         searchRequest.setScope( SearchScope.getSearchScope( scope ) );
 
-        if ( IS_DEBUG )
+        if ( LOG.isDebugEnabled() )
         {
             switch ( scope )
             {
diff --git a/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/request/search/StoreSearchRequestSizeLimit.java b/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/request/search/StoreSearchRequestSizeLimit.java
index cebfdc9..8b1adc3 100644
--- a/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/request/search/StoreSearchRequestSizeLimit.java
+++ b/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/request/search/StoreSearchRequestSizeLimit.java
@@ -49,10 +49,6 @@ public class StoreSearchRequestSizeLimit extends GrammarAction<LdapMessageContai
     /** The logger */
     private static final Logger LOG = LoggerFactory.getLogger( StoreSearchRequestSizeLimit.class );
 
-    /** Speedup for logs */
-    private static final boolean IS_DEBUG = LOG.isDebugEnabled();
-
-
     /**
      * Instantiates a new action.
      */
@@ -89,7 +85,7 @@ public class StoreSearchRequestSizeLimit extends GrammarAction<LdapMessageContai
 
         searchRequest.setSizeLimit( sizeLimit );
 
-        if ( IS_DEBUG )
+        if ( LOG.isDebugEnabled() )
         {
             LOG.debug( "The sizeLimit value is set to {} objects", Long.valueOf( sizeLimit ) );
         }
diff --git a/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/request/search/StoreSearchRequestTimeLimit.java b/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/request/search/StoreSearchRequestTimeLimit.java
index a92c6cd..3a607bd 100644
--- a/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/request/search/StoreSearchRequestTimeLimit.java
+++ b/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/request/search/StoreSearchRequestTimeLimit.java
@@ -49,10 +49,6 @@ public class StoreSearchRequestTimeLimit extends GrammarAction<LdapMessageContai
     /** The logger */
     private static final Logger LOG = LoggerFactory.getLogger( StoreSearchRequestTimeLimit.class );
 
-    /** Speedup for logs */
-    private static final boolean IS_DEBUG = LOG.isDebugEnabled();
-
-
     /**
      * Instantiates a new action.
      */
@@ -90,7 +86,7 @@ public class StoreSearchRequestTimeLimit extends GrammarAction<LdapMessageContai
 
         searchRequest.setTimeLimit( timeLimit );
 
-        if ( IS_DEBUG )
+        if ( LOG.isDebugEnabled() )
         {
             LOG.debug( "The timeLimit value is set to {} seconds", Integer.valueOf( timeLimit ) );
         }
diff --git a/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/request/search/StoreSearchRequestTypesOnly.java b/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/request/search/StoreSearchRequestTypesOnly.java
index c25ce84..a62c07d 100644
--- a/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/request/search/StoreSearchRequestTypesOnly.java
+++ b/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/request/search/StoreSearchRequestTypesOnly.java
@@ -50,10 +50,6 @@ public class StoreSearchRequestTypesOnly extends GrammarAction<LdapMessageContai
     /** The logger */
     private static final Logger LOG = LoggerFactory.getLogger( StoreSearchRequestTypesOnly.class );
 
-    /** Speedup for logs */
-    private static final boolean IS_DEBUG = LOG.isDebugEnabled();
-
-
     /**
      * Instantiates a new action.
      */
@@ -92,7 +88,7 @@ public class StoreSearchRequestTypesOnly extends GrammarAction<LdapMessageContai
             throw new DecoderException( bde.getMessage(), bde );
         }
 
-        if ( IS_DEBUG )
+        if ( LOG.isDebugEnabled() )
         {
             LOG.debug( "The search will return {}", searchRequest.getTypesOnly() ? "only attributs type"
                 : "attributes types and values" );
diff --git a/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/request/search/StoreTypeMatchingRule.java b/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/request/search/StoreTypeMatchingRule.java
index fb96077..6f347c8 100644
--- a/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/request/search/StoreTypeMatchingRule.java
+++ b/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/request/search/StoreTypeMatchingRule.java
@@ -43,10 +43,6 @@ public class StoreTypeMatchingRule extends GrammarAction<LdapMessageContainer<Se
     /** The logger. */
     private static final Logger LOG = LoggerFactory.getLogger( StoreTypeMatchingRule.class );
 
-    /** Speedup for logs */
-    private static final boolean IS_DEBUG = LOG.isDebugEnabled();
-
-
     /**
      * Instantiates a new store type matching rule action.
      */
@@ -79,7 +75,7 @@ public class StoreTypeMatchingRule extends GrammarAction<LdapMessageContainer<Se
             String type = Strings.utf8ToString( tlv.getValue().getData() );
             extensibleMatchFilter.setType( type );
 
-            if ( IS_DEBUG )
+            if ( LOG.isDebugEnabled() )
             {
                 LOG.debug( "Stored a type matching rule : {}", type );
             }
diff --git a/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/request/search/filter/InitAndFilter.java b/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/request/search/filter/InitAndFilter.java
index afc7d1e..d5fa1de 100644
--- a/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/request/search/filter/InitAndFilter.java
+++ b/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/request/search/filter/InitAndFilter.java
@@ -42,10 +42,6 @@ public class InitAndFilter extends GrammarAction<LdapMessageContainer<SearchRequ
     /** The logger */
     private static final Logger LOG = LoggerFactory.getLogger( InitAndFilter.class );
 
-    /** Speedup for logs */
-    private static final boolean IS_DEBUG = LOG.isDebugEnabled();
-
-
     /**
      * Instantiates a new init AND filter action.
      */
@@ -77,7 +73,7 @@ public class InitAndFilter extends GrammarAction<LdapMessageContainer<SearchRequ
         // Set the filter
         searchRequestDecorator.addCurrentFilter( andFilter );
 
-        if ( IS_DEBUG )
+        if ( LOG.isDebugEnabled() )
         {
             LOG.debug( "Initialize AND filter" );
         }
diff --git a/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/request/search/filter/InitApproxMatchFilter.java b/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/request/search/filter/InitApproxMatchFilter.java
index 59b786f..0fbc6d9 100644
--- a/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/request/search/filter/InitApproxMatchFilter.java
+++ b/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/request/search/filter/InitApproxMatchFilter.java
@@ -41,10 +41,6 @@ public class InitApproxMatchFilter extends GrammarAction<LdapMessageContainer<Se
     /** The logger */
     private static final Logger LOG = LoggerFactory.getLogger( InitApproxMatchFilter.class );
 
-    /** Speedup for logs */
-    private static final boolean IS_DEBUG = LOG.isDebugEnabled();
-
-
     /**
      * Instantiates a new init approx match filter action.
      */
@@ -71,7 +67,7 @@ public class InitApproxMatchFilter extends GrammarAction<LdapMessageContainer<Se
         // fulfilled
         searchRequestDecorator.setTerminalFilter( filter );
 
-        if ( IS_DEBUG )
+        if ( LOG.isDebugEnabled() )
         {
             LOG.debug( "Initialize Approx Match filter" );
         }
diff --git a/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/request/search/filter/InitAssertionValueFilter.java b/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/request/search/filter/InitAssertionValueFilter.java
index f367532..4d9bc09 100644
--- a/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/request/search/filter/InitAssertionValueFilter.java
+++ b/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/request/search/filter/InitAssertionValueFilter.java
@@ -42,10 +42,6 @@ public class InitAssertionValueFilter extends GrammarAction<LdapMessageContainer
     /** The logger */
     private static final Logger LOG = LoggerFactory.getLogger( InitAssertionValueFilter.class );
 
-    /** Speedup for logs */
-    private static final boolean IS_DEBUG = LOG.isDebugEnabled();
-
-
     /**
      * Instantiates a new init assertion value filter action.
      */
@@ -84,7 +80,7 @@ public class InitAssertionValueFilter extends GrammarAction<LdapMessageContainer
         // not terminal.
         searchRequestDecorator.unstackFilters( container );
 
-        if ( IS_DEBUG )
+        if ( LOG.isDebugEnabled() )
         {
             LOG.debug( "Initialize Assertion Value filter" );
         }
diff --git a/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/request/search/filter/InitAttributeDescFilter.java b/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/request/search/filter/InitAttributeDescFilter.java
index 09508b4..400dcf9 100644
--- a/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/request/search/filter/InitAttributeDescFilter.java
+++ b/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/request/search/filter/InitAttributeDescFilter.java
@@ -43,10 +43,6 @@ public class InitAttributeDescFilter extends GrammarAction<LdapMessageContainer<
     /** The logger */
     private static final Logger LOG = LoggerFactory.getLogger( InitAttributeDescFilter.class );
 
-    /** Speedup for logs */
-    private static final boolean IS_DEBUG = LOG.isDebugEnabled();
-
-
     /**
      * Instantiates a new init attribute desc filter action.
      */
@@ -83,7 +79,7 @@ public class InitAttributeDescFilter extends GrammarAction<LdapMessageContainer<
             terminalFilter.setAssertion( assertion );
         }
 
-        if ( IS_DEBUG )
+        if ( LOG.isDebugEnabled() )
         {
             LOG.debug( "Initialize AttributeDesc filter" );
         }
diff --git a/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/request/search/filter/InitEqualityMatchFilter.java b/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/request/search/filter/InitEqualityMatchFilter.java
index c675fa9..83f1af9 100644
--- a/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/request/search/filter/InitEqualityMatchFilter.java
+++ b/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/request/search/filter/InitEqualityMatchFilter.java
@@ -41,10 +41,6 @@ public class InitEqualityMatchFilter extends GrammarAction<LdapMessageContainer<
     /** The logger */
     private static final Logger LOG = LoggerFactory.getLogger( InitEqualityMatchFilter.class );
 
-    /** Speedup for logs */
-    private static final boolean IS_DEBUG = LOG.isDebugEnabled();
-
-
     /**
      * Instantiates a new init equality match filter action.
      */
@@ -71,7 +67,7 @@ public class InitEqualityMatchFilter extends GrammarAction<LdapMessageContainer<
         // fulfilled
         searchRequestDecorator.setTerminalFilter( filter );
 
-        if ( IS_DEBUG )
+        if ( LOG.isDebugEnabled() )
         {
             LOG.debug( "Initialize Equality Match filter" );
         }
diff --git a/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/request/search/filter/InitExtensibleMatchFilter.java b/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/request/search/filter/InitExtensibleMatchFilter.java
index 9949cf4..3e7f158 100644
--- a/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/request/search/filter/InitExtensibleMatchFilter.java
+++ b/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/request/search/filter/InitExtensibleMatchFilter.java
@@ -40,10 +40,6 @@ public class InitExtensibleMatchFilter extends GrammarAction<LdapMessageContaine
     /** The logger */
     private static final Logger LOG = LoggerFactory.getLogger( InitExtensibleMatchFilter.class );
 
-    /** Speedup for logs */
-    private static final boolean IS_DEBUG = LOG.isDebugEnabled();
-
-
     /**
      * Instantiates a new init extensible match filter action.
      */
@@ -66,7 +62,7 @@ public class InitExtensibleMatchFilter extends GrammarAction<LdapMessageContaine
         searchRequestDecorator.addCurrentFilter( extensibleMatchFilter );
         searchRequestDecorator.setTerminalFilter( extensibleMatchFilter );
 
-        if ( IS_DEBUG )
+        if ( LOG.isDebugEnabled() )
         {
             LOG.debug( "Initialize Extensible Match filter" );
         }
diff --git a/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/request/search/filter/InitGreaterOrEqualFilter.java b/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/request/search/filter/InitGreaterOrEqualFilter.java
index 46f297b..4d21eac 100644
--- a/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/request/search/filter/InitGreaterOrEqualFilter.java
+++ b/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/request/search/filter/InitGreaterOrEqualFilter.java
@@ -41,10 +41,6 @@ public class InitGreaterOrEqualFilter extends GrammarAction<LdapMessageContainer
     /** The logger */
     private static final Logger LOG = LoggerFactory.getLogger( InitGreaterOrEqualFilter.class );
 
-    /** Speedup for logs */
-    private static final boolean IS_DEBUG = LOG.isDebugEnabled();
-
-
     /**
      * Instantiates a new init greater or equal filter action.
      */
@@ -71,7 +67,7 @@ public class InitGreaterOrEqualFilter extends GrammarAction<LdapMessageContainer
         // fulfilled
         searchRequestDecorator.setTerminalFilter( filter );
 
-        if ( IS_DEBUG )
+        if ( LOG.isDebugEnabled() )
         {
             LOG.debug( "Initialize Greater Or Equal filter" );
         }
diff --git a/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/request/search/filter/InitLessOrEqualFilter.java b/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/request/search/filter/InitLessOrEqualFilter.java
index ef492c6..9d1ac4f 100644
--- a/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/request/search/filter/InitLessOrEqualFilter.java
+++ b/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/request/search/filter/InitLessOrEqualFilter.java
@@ -41,10 +41,6 @@ public class InitLessOrEqualFilter extends GrammarAction<LdapMessageContainer<Se
     /** The logger */
     private static final Logger LOG = LoggerFactory.getLogger( InitLessOrEqualFilter.class );
 
-    /** Speedup for logs */
-    private static final boolean IS_DEBUG = LOG.isDebugEnabled();
-
-
     /**
      * Instantiates a new init less or equal filter action.
      */
@@ -71,7 +67,7 @@ public class InitLessOrEqualFilter extends GrammarAction<LdapMessageContainer<Se
         // fulfilled
         searchRequestDecorator.setTerminalFilter( filter );
 
-        if ( IS_DEBUG )
+        if ( LOG.isDebugEnabled() )
         {
             LOG.debug( "Initialize Less Or Equal filter" );
         }
diff --git a/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/request/search/filter/InitNotFilter.java b/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/request/search/filter/InitNotFilter.java
index df9830f..57850d9 100644
--- a/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/request/search/filter/InitNotFilter.java
+++ b/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/request/search/filter/InitNotFilter.java
@@ -42,10 +42,6 @@ public class InitNotFilter extends GrammarAction<LdapMessageContainer<SearchRequ
     /** The logger */
     private static final Logger LOG = LoggerFactory.getLogger( InitNotFilter.class );
 
-    /** Speedup for logs */
-    private static final boolean IS_DEBUG = LOG.isDebugEnabled();
-
-
     /**
      * Instantiates a new init NOT filter action.
      */
@@ -77,7 +73,7 @@ public class InitNotFilter extends GrammarAction<LdapMessageContainer<SearchRequ
         // Set the filter
         searchRequestDecorator.addCurrentFilter( notFilter );
 
-        if ( IS_DEBUG )
+        if ( LOG.isDebugEnabled() )
         {
             LOG.debug( "Initialize NOT filter" );
         }
diff --git a/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/request/search/filter/InitOrFilter.java b/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/request/search/filter/InitOrFilter.java
index 8693ca9..57383be 100644
--- a/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/request/search/filter/InitOrFilter.java
+++ b/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/request/search/filter/InitOrFilter.java
@@ -42,10 +42,6 @@ public class InitOrFilter extends GrammarAction<LdapMessageContainer<SearchReque
     /** The logger */
     private static final Logger LOG = LoggerFactory.getLogger( InitOrFilter.class );
 
-    /** Speedup for logs */
-    private static final boolean IS_DEBUG = LOG.isDebugEnabled();
-
-
     /**
      * Instantiates a new init OR filter action.
      */
@@ -77,7 +73,7 @@ public class InitOrFilter extends GrammarAction<LdapMessageContainer<SearchReque
         // Set the filter
         searchRequestDecorator.addCurrentFilter( orFilter );
 
-        if ( IS_DEBUG )
+        if ( LOG.isDebugEnabled() )
         {
             LOG.debug( "Initialize OR filter" );
         }
diff --git a/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/request/search/filter/InitPresentFilter.java b/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/request/search/filter/InitPresentFilter.java
index 029f38f..e483954 100644
--- a/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/request/search/filter/InitPresentFilter.java
+++ b/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/request/search/filter/InitPresentFilter.java
@@ -42,10 +42,6 @@ public class InitPresentFilter extends GrammarAction<LdapMessageContainer<Search
     /** The logger */
     private static final Logger LOG = LoggerFactory.getLogger( InitPresentFilter.class );
 
-    /** Speedup for logs */
-    private static final boolean IS_DEBUG = LOG.isDebugEnabled();
-
-
     /**
      * Instantiates a new init present filter action.
      */
@@ -88,7 +84,7 @@ public class InitPresentFilter extends GrammarAction<LdapMessageContainer<Search
         // not terminal.
         searchRequestDecorator.unstackFilters( container );
 
-        if ( IS_DEBUG )
+        if ( LOG.isDebugEnabled() )
         {
             LOG.debug( "Initialize Present filter" );
         }
diff --git a/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/request/search/filter/InitSubstringsFilter.java b/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/request/search/filter/InitSubstringsFilter.java
index 202c44c..df7f8c9 100644
--- a/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/request/search/filter/InitSubstringsFilter.java
+++ b/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/request/search/filter/InitSubstringsFilter.java
@@ -42,10 +42,6 @@ public class InitSubstringsFilter extends GrammarAction<LdapMessageContainer<Sea
     /** The logger */
     private static final Logger LOG = LoggerFactory.getLogger( InitSubstringsFilter.class );
 
-    /** Speedup for logs */
-    private static final boolean IS_DEBUG = LOG.isDebugEnabled();
-
-
     /**
      * Instantiates a new init substrings filter action.
      */
@@ -79,7 +75,7 @@ public class InitSubstringsFilter extends GrammarAction<LdapMessageContainer<Sea
         searchRequestDecorator.addCurrentFilter( substringFilter );
         searchRequestDecorator.setTerminalFilter( substringFilter );
 
-        if ( IS_DEBUG )
+        if ( LOG.isDebugEnabled() )
         {
             LOG.debug( "Initialize Substrings filter" );
         }
diff --git a/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/request/search/filter/StoreAny.java b/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/request/search/filter/StoreAny.java
index cf76eb9..8c8c85d 100644
--- a/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/request/search/filter/StoreAny.java
+++ b/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/request/search/filter/StoreAny.java
@@ -49,10 +49,6 @@ public class StoreAny extends GrammarAction<LdapMessageContainer<SearchRequestDe
     /** The logger */
     private static final Logger LOG = LoggerFactory.getLogger( StoreAny.class );
 
-    /** Speedup for logs */
-    private static final boolean IS_DEBUG = LOG.isDebugEnabled();
-
-
     /**
      * Instantiates a new store any action.
      */
@@ -88,7 +84,7 @@ public class StoreAny extends GrammarAction<LdapMessageContainer<SearchRequestDe
         // not terminal.
         decorator.unstackFilters( container );
 
-        if ( IS_DEBUG )
+        if ( LOG.isDebugEnabled() )
         {
             LOG.debug( "Stored a any substring : {}", any );
         }
diff --git a/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/request/search/filter/StoreFinal.java b/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/request/search/filter/StoreFinal.java
index c89bcb1..7fd1984 100644
--- a/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/request/search/filter/StoreFinal.java
+++ b/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/request/search/filter/StoreFinal.java
@@ -49,10 +49,6 @@ public class StoreFinal extends GrammarAction<LdapMessageContainer<SearchRequest
     /** The logger */
     private static final Logger LOG = LoggerFactory.getLogger( StoreFinal.class );
 
-    /** Speedup for logs */
-    private static final boolean IS_DEBUG = LOG.isDebugEnabled();
-
-
     /**
      * Instantiates a new store final action.
      */
@@ -88,7 +84,7 @@ public class StoreFinal extends GrammarAction<LdapMessageContainer<SearchRequest
         // not terminal.
         searchRequest.unstackFilters( container );
 
-        if ( IS_DEBUG )
+        if ( LOG.isDebugEnabled() )
         {
             LOG.debug( "Stored a any substring : {}", finalValue );
         }
diff --git a/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/request/search/filter/StoreMatchValue.java b/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/request/search/filter/StoreMatchValue.java
index f8b6be5..2ab993d 100644
--- a/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/request/search/filter/StoreMatchValue.java
+++ b/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/request/search/filter/StoreMatchValue.java
@@ -50,10 +50,6 @@ public class StoreMatchValue extends GrammarAction<LdapMessageContainer<SearchRe
     /** The logger */
     private static final Logger LOG = LoggerFactory.getLogger( StoreMatchValue.class );
 
-    /** Speedup for logs */
-    private static final boolean IS_DEBUG = LOG.isDebugEnabled();
-
-
     /**
      * Instantiates a new store match value action.
      */
@@ -81,7 +77,7 @@ public class StoreMatchValue extends GrammarAction<LdapMessageContainer<SearchRe
         // unstack the filters if needed
         decorator.unstackFilters( container );
 
-        if ( IS_DEBUG )
+        if ( LOG.isDebugEnabled() )
         {
             LOG.debug( "Stored a match value : {}", value );
         }
diff --git a/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/request/search/filter/StoreMatchingRuleDnAttributes.java b/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/request/search/filter/StoreMatchingRuleDnAttributes.java
index 4411c5f..e6204c3 100644
--- a/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/request/search/filter/StoreMatchingRuleDnAttributes.java
+++ b/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/request/search/filter/StoreMatchingRuleDnAttributes.java
@@ -53,10 +53,6 @@ public class StoreMatchingRuleDnAttributes extends GrammarAction<LdapMessageCont
     /** The logger */
     private static final Logger LOG = LoggerFactory.getLogger( StoreMatchingRuleDnAttributes.class );
 
-    /** Speedup for logs */
-    private static final boolean IS_DEBUG = LOG.isDebugEnabled();
-
-
     /**
      * Instantiates a new StoreMatchingRuleDnAttributes.
      */
@@ -95,7 +91,7 @@ public class StoreMatchingRuleDnAttributes extends GrammarAction<LdapMessageCont
             throw new DecoderException( bde.getMessage(), bde );
         }
 
-        if ( IS_DEBUG )
+        if ( LOG.isDebugEnabled() )
         {
             LOG.debug( "Dn Attributes : {}", Boolean.valueOf( extensibleMatchFilter.isDnAttributes() ) );
         }
diff --git a/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/response/add/InitAddResponse.java b/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/response/add/InitAddResponse.java
index 7640fd2..3274538 100644
--- a/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/response/add/InitAddResponse.java
+++ b/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/response/add/InitAddResponse.java
@@ -76,6 +76,9 @@ public class InitAddResponse extends GrammarAction<LdapMessageContainer<AddRespo
             throw new DecoderException( msg );
         }
 
-        LOG.debug( "Add Response" );
+        if ( LOG.isDebugEnabled() )
+        {
+            LOG.debug( "Add Response" );
+        }
     }
 }
diff --git a/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/response/bind/StoreServerSASLCreds.java b/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/response/bind/StoreServerSASLCreds.java
index 351591c..d9d8ace 100644
--- a/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/response/bind/StoreServerSASLCreds.java
+++ b/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/response/bind/StoreServerSASLCreds.java
@@ -45,10 +45,6 @@ public class StoreServerSASLCreds extends GrammarAction<LdapMessageContainer<Bin
     /** The logger */
     private static final Logger LOG = LoggerFactory.getLogger( StoreServerSASLCreds.class );
 
-    /** Speedup for logs */
-    private static final boolean IS_DEBUG = LOG.isDebugEnabled();
-
-
     /**
      * Instantiates a new server sasl creds action.
      */
@@ -85,7 +81,7 @@ public class StoreServerSASLCreds extends GrammarAction<LdapMessageContainer<Bin
         // We can have an END transition
         container.setGrammarEndAllowed( true );
 
-        if ( IS_DEBUG )
+        if ( LOG.isDebugEnabled() )
         {
             LOG.debug( "The SASL credentials value is : {}", Strings.dumpBytes( serverSaslCreds ) );
         }
diff --git a/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/response/compare/InitCompareResponse.java b/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/response/compare/InitCompareResponse.java
index 36ad72a..48232c5 100644
--- a/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/response/compare/InitCompareResponse.java
+++ b/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/response/compare/InitCompareResponse.java
@@ -74,6 +74,9 @@ public class InitCompareResponse extends GrammarAction<LdapMessageContainer<Comp
             throw new DecoderException( msg );
         }
 
-        LOG.debug( "Compare response " );
+        if ( LOG.isDebugEnabled() )
+        {
+            LOG.debug( "Compare response " );
+        }
     }
 }
diff --git a/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/response/del/InitDelResponse.java b/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/response/del/InitDelResponse.java
index e020483..bd60f49 100644
--- a/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/response/del/InitDelResponse.java
+++ b/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/response/del/InitDelResponse.java
@@ -61,6 +61,9 @@ public class InitDelResponse extends GrammarAction<LdapMessageContainer<DeleteRe
             container.getLdapCodecService(), new DeleteResponseImpl( container.getMessageId() ) );
         container.setMessage( delResponse );
 
-        LOG.debug( "Del response " );
+        if ( LOG.isDebugEnabled() )
+        {
+            LOG.debug( "Del response " );
+        }
     }
 }
diff --git a/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/response/extended/InitExtendedResponse.java b/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/response/extended/InitExtendedResponse.java
index 75a24d7..9445ae2 100644
--- a/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/response/extended/InitExtendedResponse.java
+++ b/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/response/extended/InitExtendedResponse.java
@@ -62,6 +62,9 @@ public class InitExtendedResponse extends GrammarAction<LdapMessageContainer<Ext
             container.getLdapCodecService(), new ExtendedResponseImpl( container.getMessageId() ) );
         container.setMessage( extendedResponse );
 
-        LOG.debug( "Extended Response" );
+        if ( LOG.isDebugEnabled() )
+        {
+            LOG.debug( "Extended Response" );
+        }
     }
 }
diff --git a/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/response/extended/StoreExtendedResponseName.java b/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/response/extended/StoreExtendedResponseName.java
index 3ddf6ee..a16dabf 100644
--- a/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/response/extended/StoreExtendedResponseName.java
+++ b/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/response/extended/StoreExtendedResponseName.java
@@ -51,10 +51,6 @@ public class StoreExtendedResponseName extends GrammarAction<LdapMessageContaine
     /** The logger */
     private static final Logger LOG = LoggerFactory.getLogger( StoreExtendedResponseName.class );
 
-    /** Speedup for logs */
-    private static final boolean IS_DEBUG = LOG.isDebugEnabled();
-
-
     /**
      * Instantiates a new response name action.
      */
@@ -99,7 +95,7 @@ public class StoreExtendedResponseName extends GrammarAction<LdapMessageContaine
         // We can have an END transition
         container.setGrammarEndAllowed( true );
 
-        if ( IS_DEBUG )
+        if ( LOG.isDebugEnabled() )
         {
             LOG.debug( "OID read : {}", extendedResponse.getResponseName() );
         }
diff --git a/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/response/extended/StoreExtendedResponseValue.java b/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/response/extended/StoreExtendedResponseValue.java
index 329076a..85933d9 100644
--- a/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/response/extended/StoreExtendedResponseValue.java
+++ b/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/response/extended/StoreExtendedResponseValue.java
@@ -44,10 +44,6 @@ public class StoreExtendedResponseValue extends GrammarAction<LdapMessageContain
     /** The logger */
     private static final Logger LOG = LoggerFactory.getLogger( StoreExtendedResponseValue.class );
 
-    /** Speedup for logs */
-    private static final boolean IS_DEBUG = LOG.isDebugEnabled();
-
-
     /**
      * Instantiates a new response action.
      */
@@ -82,7 +78,7 @@ public class StoreExtendedResponseValue extends GrammarAction<LdapMessageContain
         // We can have an END transition
         container.setGrammarEndAllowed( true );
 
-        if ( IS_DEBUG )
+        if ( LOG.isDebugEnabled() )
         {
             LOG.debug( "Extended value : {}", extendedResponse.getResponseValue() );
         }
diff --git a/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/response/intermediate/InitIntermediateResponse.java b/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/response/intermediate/InitIntermediateResponse.java
index e62c48f..62bc9c2 100644
--- a/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/response/intermediate/InitIntermediateResponse.java
+++ b/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/response/intermediate/InitIntermediateResponse.java
@@ -63,6 +63,9 @@ public class InitIntermediateResponse extends GrammarAction<LdapMessageContainer
                 new IntermediateResponseImpl( container.getMessageId() ) );
         container.setMessage( intermediateResponse );
 
-        LOG.debug( "Intermediate Response" );
+        if ( LOG.isDebugEnabled() )
+        {
+            LOG.debug( "Intermediate Response" );
+        }
     }
 }
diff --git a/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/response/intermediate/StoreIntermediateResponseName.java b/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/response/intermediate/StoreIntermediateResponseName.java
index 5713fce..757040d 100644
--- a/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/response/intermediate/StoreIntermediateResponseName.java
+++ b/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/response/intermediate/StoreIntermediateResponseName.java
@@ -46,10 +46,6 @@ public class StoreIntermediateResponseName extends GrammarAction<LdapMessageCont
     /** The logger */
     private static final Logger LOG = LoggerFactory.getLogger( StoreIntermediateResponseName.class );
 
-    /** Speedup for logs */
-    private static final boolean IS_DEBUG = LOG.isDebugEnabled();
-
-
     /**
      * Instantiates a new response name action.
      */
@@ -105,7 +101,7 @@ public class StoreIntermediateResponseName extends GrammarAction<LdapMessageCont
         // We can have an END transition
         container.setGrammarEndAllowed( true );
 
-        if ( IS_DEBUG )
+        if ( LOG.isDebugEnabled() )
         {
             LOG.debug( "OID read : {}", intermediateResponse.getResponseName() );
         }
diff --git a/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/response/intermediate/StoreIntermediateResponseValue.java b/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/response/intermediate/StoreIntermediateResponseValue.java
index 07adef2..109f080 100644
--- a/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/response/intermediate/StoreIntermediateResponseValue.java
+++ b/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/response/intermediate/StoreIntermediateResponseValue.java
@@ -46,10 +46,6 @@ public class StoreIntermediateResponseValue extends GrammarAction<LdapMessageCon
     /** The logger */
     private static final Logger LOG = LoggerFactory.getLogger( StoreIntermediateResponseValue.class );
 
-    /** Speedup for logs */
-    private static final boolean IS_DEBUG = LOG.isDebugEnabled();
-
-
     /**
      * Instantiates a new response name action.
      */
@@ -84,7 +80,7 @@ public class StoreIntermediateResponseValue extends GrammarAction<LdapMessageCon
         // We can have an END transition
         container.setGrammarEndAllowed( true );
 
-        if ( IS_DEBUG )
+        if ( LOG.isDebugEnabled() )
         {
             LOG.debug( "Value read : {}", Strings.dumpBytes( intermediateResponse.getResponseValue() ) );
         }
diff --git a/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/response/modify/InitModifyResponse.java b/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/response/modify/InitModifyResponse.java
index a67f596..772e896 100644
--- a/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/response/modify/InitModifyResponse.java
+++ b/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/response/modify/InitModifyResponse.java
@@ -61,6 +61,9 @@ public class InitModifyResponse extends GrammarAction<LdapMessageContainer<Modif
             container.getLdapCodecService(), new ModifyResponseImpl( container.getMessageId() ) );
         container.setMessage( modifyResponse );
 
-        LOG.debug( "Modify response" );
+        if ( LOG.isDebugEnabled() )
+        {
+            LOG.debug( "Modify response" );
+        }
     }
 }
diff --git a/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/response/modifydn/InitModifyDnResponse.java b/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/response/modifydn/InitModifyDnResponse.java
index aca94c5..685a4b7 100644
--- a/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/response/modifydn/InitModifyDnResponse.java
+++ b/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/response/modifydn/InitModifyDnResponse.java
@@ -60,6 +60,9 @@ public class InitModifyDnResponse extends GrammarAction<LdapMessageContainer<Mod
             container.getLdapCodecService(), new ModifyDnResponseImpl( container.getMessageId() ) );
         container.setMessage( modifyDnResponse );
 
-        LOG.debug( "Modify Dn response " );
+        if ( LOG.isDebugEnabled() )
+        {
+            LOG.debug( "Modify Dn response " );
+        }
     }
 }
diff --git a/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/response/search/done/InitSearchResultDone.java b/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/response/search/done/InitSearchResultDone.java
index c93f248..0fe8ad7 100644
--- a/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/response/search/done/InitSearchResultDone.java
+++ b/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/response/search/done/InitSearchResultDone.java
@@ -61,6 +61,9 @@ public class InitSearchResultDone extends GrammarAction<LdapMessageContainer<Sea
             container.getLdapCodecService(), new SearchResultDoneImpl( container.getMessageId() ) );
         container.setMessage( searchResultDone );
 
-        LOG.debug( "Search Result Done found" );
+        if ( LOG.isDebugEnabled() )
+        {
+            LOG.debug( "Search Result Done found" );
+        }
     }
 }
diff --git a/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/response/search/entry/AddAttributeType.java b/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/response/search/entry/AddAttributeType.java
index 353a7e0..68e67e4 100644
--- a/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/response/search/entry/AddAttributeType.java
+++ b/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/response/search/entry/AddAttributeType.java
@@ -50,10 +50,6 @@ public class AddAttributeType extends GrammarAction<LdapMessageContainer<SearchR
     /** The logger */
     private static final Logger LOG = LoggerFactory.getLogger( AddAttributeType.class );
 
-    /** Speedup for logs */
-    private static final boolean IS_DEBUG = LOG.isDebugEnabled();
-
-
     /**
      * Instantiates a new action.
      */
@@ -96,7 +92,7 @@ public class AddAttributeType extends GrammarAction<LdapMessageContainer<SearchR
             }
         }
 
-        if ( IS_DEBUG )
+        if ( LOG.isDebugEnabled() )
         {
             String type = Strings.utf8ToString( tlv.getValue().getData() );
             LOG.debug( "Attribute type : {}", type );
diff --git a/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/response/search/entry/StoreSearchResultAttributeValue.java b/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/response/search/entry/StoreSearchResultAttributeValue.java
index ee1fd62..0c3a024 100644
--- a/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/response/search/entry/StoreSearchResultAttributeValue.java
+++ b/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/response/search/entry/StoreSearchResultAttributeValue.java
@@ -46,10 +46,6 @@ public class StoreSearchResultAttributeValue extends GrammarAction<LdapMessageCo
     /** The logger */
     private static final Logger LOG = LoggerFactory.getLogger( StoreSearchResultAttributeValue.class );
 
-    /** Speedup for logs */
-    private static final boolean IS_DEBUG = LOG.isDebugEnabled();
-
-
     /**
      * Instantiates a new search result attribute value action.
      */
@@ -77,7 +73,10 @@ public class StoreSearchResultAttributeValue extends GrammarAction<LdapMessageCo
             {
                 searchResultEntry.addAttributeValue( "" );
 
-                LOG.debug( "The attribute value is null" );
+                if ( LOG.isDebugEnabled() )
+                {
+                    LOG.debug( "The attribute value is null" );
+                }
             }
             else
             {
@@ -85,7 +84,7 @@ public class StoreSearchResultAttributeValue extends GrammarAction<LdapMessageCo
                 {
                     value = tlv.getValue().getData();
 
-                    if ( IS_DEBUG )
+                    if ( LOG.isDebugEnabled() )
                     {
                         LOG.debug( "Attribute value {}", Strings.dumpBytes( ( byte[] ) value ) );
                     }
@@ -94,7 +93,10 @@ public class StoreSearchResultAttributeValue extends GrammarAction<LdapMessageCo
                 {
                     value = Strings.utf8ToString( tlv.getValue().getData() );
 
-                    LOG.debug( "Attribute value {}", value );
+                    if ( LOG.isDebugEnabled() )
+                    {
+                        LOG.debug( "Attribute value {}", value );
+                    }
                 }
 
                 searchResultEntry.addAttributeValue( value );
diff --git a/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/response/search/entry/StoreSearchResultEntryObjectName.java b/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/response/search/entry/StoreSearchResultEntryObjectName.java
index 88f48e0..1d8f9e0 100644
--- a/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/response/search/entry/StoreSearchResultEntryObjectName.java
+++ b/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/response/search/entry/StoreSearchResultEntryObjectName.java
@@ -48,10 +48,6 @@ public class StoreSearchResultEntryObjectName extends GrammarAction<LdapMessageC
     /** The logger */
     private static final Logger LOG = LoggerFactory.getLogger( StoreSearchResultEntryObjectName.class );
 
-    /** Speedup for logs */
-    private static final boolean IS_DEBUG = LOG.isDebugEnabled();
-
-
     /**
      * Instantiates a new action.
      */
@@ -98,7 +94,7 @@ public class StoreSearchResultEntryObjectName extends GrammarAction<LdapMessageC
             searchResultEntry.setObjectName( objectName );
         }
 
-        if ( IS_DEBUG )
+        if ( LOG.isDebugEnabled() )
         {
             LOG.debug( "Search Result Entry Dn found : {}", searchResultEntry.getObjectName() );
         }
diff --git a/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/response/search/reference/InitSearchResultReference.java b/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/response/search/reference/InitSearchResultReference.java
index 007551a..85238a4 100644
--- a/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/response/search/reference/InitSearchResultReference.java
+++ b/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/response/search/reference/InitSearchResultReference.java
@@ -62,6 +62,9 @@ public class InitSearchResultReference extends GrammarAction<LdapMessageContaine
             container.getLdapCodecService(), new SearchResultReferenceImpl( container.getMessageId() ) );
         container.setMessage( searchResultReference );
 
-        LOG.debug( "SearchResultReference response " );
+        if ( LOG.isDebugEnabled() )
+        {
+            LOG.debug( "SearchResultReference response " );
+        }
     }
 }
diff --git a/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/response/search/reference/StoreReference.java b/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/response/search/reference/StoreReference.java
index a2809f7..7e2453b 100644
--- a/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/response/search/reference/StoreReference.java
+++ b/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/response/search/reference/StoreReference.java
@@ -49,10 +49,6 @@ public class StoreReference extends GrammarAction<LdapMessageContainer<SearchRes
     /** The logger */
     private static final Logger LOG = LoggerFactory.getLogger( StoreReference.class );
 
-    /** Speedup for logs */
-    private static final boolean IS_DEBUG = LOG.isDebugEnabled();
-
-
     /**
      * Instantiates a new store reference action.
      */
@@ -104,7 +100,7 @@ public class StoreReference extends GrammarAction<LdapMessageContainer<SearchRes
             }
         }
 
-        if ( IS_DEBUG )
+        if ( LOG.isDebugEnabled() )
         {
             LOG.debug( "Search reference URL found : {}", url );
         }
diff --git a/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/api/LdapDecoder.java b/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/api/LdapDecoder.java
index 448f9fb..e6b70a8 100644
--- a/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/api/LdapDecoder.java
+++ b/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/api/LdapDecoder.java
@@ -42,9 +42,6 @@ public class LdapDecoder
     /** The logger */
     private static final Logger LOG = LoggerFactory.getLogger( LdapDecoder.class );
 
-    /** A speedup for logger */
-    private static final boolean IS_DEBUG = LOG.isDebugEnabled();
-
     /** The ASN 1 decoder instance */
     private Asn1Decoder asn1Decoder;
 
@@ -102,7 +99,7 @@ public class LdapDecoder
 
         if ( container.getState() == TLVStateEnum.PDU_DECODED )
         {
-            if ( IS_DEBUG )
+            if ( LOG.isDebugEnabled() )
             {
                 LOG.debug( "Decoded LdapMessage : " + container );
             }
diff --git a/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/controls/search/entryChange/EntryChangeGrammar.java b/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/controls/search/entryChange/EntryChangeGrammar.java
index f7274df..fb3920f 100644
--- a/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/controls/search/entryChange/EntryChangeGrammar.java
+++ b/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/controls/search/entryChange/EntryChangeGrammar.java
@@ -51,9 +51,6 @@ public final class EntryChangeGrammar extends AbstractGrammar<EntryChangeContain
     /** The logger */
     static final Logger LOG = LoggerFactory.getLogger( EntryChangeGrammar.class );
 
-    /** Speedup for logs */
-    static final boolean IS_DEBUG = LOG.isDebugEnabled();
-
     /** The instance of grammar. EntryChangeGrammar is a singleton */
     private static Grammar<?> instance = new EntryChangeGrammar();
 
@@ -111,7 +108,7 @@ public final class EntryChangeGrammar extends AbstractGrammar<EntryChangeContain
                                 case MODIFY:
                                     ChangeType changeType = ChangeType.getChangeType( change );
 
-                                    if ( IS_DEBUG )
+                                    if ( LOG.isDebugEnabled() )
                                     {
                                         LOG.debug( "changeType = " + changeType );
                                     }
@@ -181,7 +178,7 @@ public final class EntryChangeGrammar extends AbstractGrammar<EntryChangeContain
                                 throw new DecoderException( I18n.err( I18n.ERR_04048 ), ine );
                             }
 
-                            if ( IS_DEBUG )
+                            if ( LOG.isDebugEnabled() )
                             {
                                 LOG.debug( "previousDN = " + previousDn );
                             }
@@ -206,7 +203,7 @@ public final class EntryChangeGrammar extends AbstractGrammar<EntryChangeContain
                 {
                     long changeNumber = LongDecoder.parse( value );
 
-                    if ( IS_DEBUG )
+                    if ( LOG.isDebugEnabled() )
                     {
                         LOG.debug( "changeNumber = " + changeNumber );
                     }
diff --git a/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/controls/search/pagedSearch/PagedResultsGrammar.java b/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/controls/search/pagedSearch/PagedResultsGrammar.java
index 545dbf2..df290b6 100644
--- a/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/controls/search/pagedSearch/PagedResultsGrammar.java
+++ b/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/controls/search/pagedSearch/PagedResultsGrammar.java
@@ -53,9 +53,6 @@ public final class PagedResultsGrammar extends AbstractGrammar<PagedResultsConta
     /** The logger */
     static final Logger LOG = LoggerFactory.getLogger( PagedResultsGrammar.class );
 
-    /** Speedup for logs */
-    static final boolean IS_DEBUG = LOG.isDebugEnabled();
-
     /** The instance of grammar. PagedSearchControlGrammar is a singleton */
     private static Grammar<?> instance = new PagedResultsGrammar();
 
@@ -114,7 +111,7 @@ public final class PagedResultsGrammar extends AbstractGrammar<PagedResultsConta
                                 size = Integer.MAX_VALUE;
                             }
 
-                            if ( IS_DEBUG )
+                            if ( LOG.isDebugEnabled() )
                             {
                                 LOG.debug( "size = " + size );
                             }
diff --git a/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/controls/search/persistentSearch/PersistentSearchGrammar.java b/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/controls/search/persistentSearch/PersistentSearchGrammar.java
index 6ac275a..608e308 100644
--- a/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/controls/search/persistentSearch/PersistentSearchGrammar.java
+++ b/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/controls/search/persistentSearch/PersistentSearchGrammar.java
@@ -62,9 +62,6 @@ public final class PersistentSearchGrammar extends AbstractGrammar<PersistentSea
     /** The logger */
     static final Logger LOG = LoggerFactory.getLogger( PersistentSearchGrammar.class );
 
-    /** Speedup for logs */
-    static final boolean IS_DEBUG = LOG.isDebugEnabled();
-
     /** The instance of grammar. PSearchControlGrammar is a singleton */
     private static Grammar<?> instance = new PersistentSearchGrammar();
 
@@ -117,7 +114,7 @@ public final class PersistentSearchGrammar extends AbstractGrammar<PersistentSea
                                 PersistentSearch.CHANGE_TYPES_MIN,
                                 PersistentSearch.CHANGE_TYPES_MAX );
 
-                            if ( IS_DEBUG )
+                            if ( LOG.isDebugEnabled() )
                             {
                                 LOG.debug( "changeTypes = " + changeTypes );
                             }
@@ -155,7 +152,7 @@ public final class PersistentSearchGrammar extends AbstractGrammar<PersistentSea
                         {
                             boolean changesOnly = BooleanDecoder.parse( value );
 
-                            if ( IS_DEBUG )
+                            if ( LOG.isDebugEnabled() )
                             {
                                 LOG.debug( "changesOnly = " + changesOnly );
                             }
@@ -193,7 +190,7 @@ public final class PersistentSearchGrammar extends AbstractGrammar<PersistentSea
                         {
                             boolean returnECs = BooleanDecoder.parse( value );
 
-                            if ( IS_DEBUG )
+                            if ( LOG.isDebugEnabled() )
                             {
                                 LOG.debug( "returnECs = " + returnECs );
                             }
diff --git a/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/controls/sort/SortRequestGrammar.java b/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/controls/sort/SortRequestGrammar.java
index 7d60d43..104d70b 100644
--- a/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/controls/sort/SortRequestGrammar.java
+++ b/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/controls/sort/SortRequestGrammar.java
@@ -48,9 +48,6 @@ public final class SortRequestGrammar extends AbstractGrammar<SortRequestContain
     /** The logger */
     static final Logger LOG = LoggerFactory.getLogger( SortRequestGrammar.class );
 
-    /** Speedup for logs */
-    static final boolean IS_DEBUG = LOG.isDebugEnabled();
-
     /** The instance of grammar. SortRequestGrammar is a singleton */
     private static Grammar<SortRequestContainer> instance = new SortRequestGrammar();
 
@@ -69,7 +66,8 @@ public final class SortRequestGrammar extends AbstractGrammar<SortRequestContain
                 BerValue value = container.getCurrentTLV().getValue();
 
                 String atDesc = Strings.utf8ToString( value.getData() );
-                if ( IS_DEBUG )
+                
+                if ( LOG.isDebugEnabled() )
                 {
                     LOG.debug( "AttributeTypeDesc = " + atDesc );
                 }
@@ -94,7 +92,7 @@ public final class SortRequestGrammar extends AbstractGrammar<SortRequestContain
                 {
                     boolean reverseOrder = BooleanDecoder.parse( value );
 
-                    if ( IS_DEBUG )
+                    if ( LOG.isDebugEnabled() )
                     {
                         LOG.debug( "ReverseOrder = " + reverseOrder );
                     }
@@ -144,7 +142,7 @@ public final class SortRequestGrammar extends AbstractGrammar<SortRequestContain
 
                         String matchingRuleOid = Strings.utf8ToString( value.getData() );
 
-                        if ( IS_DEBUG )
+                        if ( LOG.isDebugEnabled() )
                         {
                             LOG.debug( "MatchingRuleOid = " + matchingRuleOid );
                         }
diff --git a/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/controls/sort/SortResponseGrammar.java b/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/controls/sort/SortResponseGrammar.java
index 23121a0..991a08d 100644
--- a/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/controls/sort/SortResponseGrammar.java
+++ b/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/controls/sort/SortResponseGrammar.java
@@ -42,9 +42,6 @@ public final class SortResponseGrammar extends AbstractGrammar<SortResponseConta
     /** The logger */
     static final Logger LOG = LoggerFactory.getLogger( SortRequestGrammar.class );
 
-    /** Speedup for logs */
-    static final boolean IS_DEBUG = LOG.isDebugEnabled();
-
     /** The instance of grammar. SortResponseGrammar is a singleton */
     private static Grammar<SortResponseContainer> instance = new SortResponseGrammar();
 
@@ -79,7 +76,8 @@ public final class SortResponseGrammar extends AbstractGrammar<SortResponseConta
                         BerValue value = container.getCurrentTLV().getValue();
 
                         String atType = Strings.utf8ToString( value.getData() );
-                        if ( IS_DEBUG )
+
+                        if ( LOG.isDebugEnabled() )
                         {
                             LOG.debug( "AttributeType = " + atType );
                         }
diff --git a/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/osgi/DefaultLdapCodecService.java b/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/osgi/DefaultLdapCodecService.java
index 6ac3e5b..1580ce6 100644
--- a/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/osgi/DefaultLdapCodecService.java
+++ b/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/osgi/DefaultLdapCodecService.java
@@ -117,39 +117,75 @@ public class DefaultLdapCodecService implements LdapApiService
     {
         ControlFactory<Cascade> cascadeFactory = new CascadeFactory( this );
         controlFactories.put( cascadeFactory.getOid(), cascadeFactory );
-        LOG.info( "Registered pre-bundled control factory: {}", cascadeFactory.getOid() );
+
+        if ( LOG.isInfoEnabled() )
+        {
+            LOG.info( "Registered pre-bundled control factory: {}", cascadeFactory.getOid() );
+        }
 
         ControlFactory<EntryChange> entryChangeFactory = new EntryChangeFactory( this );
         controlFactories.put( entryChangeFactory.getOid(), entryChangeFactory );
-        LOG.info( "Registered pre-bundled control factory: {}", entryChangeFactory.getOid() );
+        
+        if ( LOG.isInfoEnabled() )
+        {
+            LOG.info( "Registered pre-bundled control factory: {}", entryChangeFactory.getOid() );
+        }
 
         ControlFactory<ManageDsaIT> manageDsaItFactory = new ManageDsaITFactory( this );
         controlFactories.put( manageDsaItFactory.getOid(), manageDsaItFactory );
-        LOG.info( "Registered pre-bundled control factory: {}", manageDsaItFactory.getOid() );
+        
+        if ( LOG.isInfoEnabled() )
+        {
+            LOG.info( "Registered pre-bundled control factory: {}", manageDsaItFactory.getOid() );
+        }
 
         ControlFactory<ProxiedAuthz> proxiedAuthzFactory = new ProxiedAuthzFactory( this );
         controlFactories.put( proxiedAuthzFactory.getOid(), proxiedAuthzFactory );
-        LOG.info( "Registered pre-bundled control factory: {}", proxiedAuthzFactory.getOid() );
+        
+        if ( LOG.isInfoEnabled() )
+        {
+            LOG.info( "Registered pre-bundled control factory: {}", proxiedAuthzFactory.getOid() );
+        }
 
         ControlFactory<PagedResults> pageResultsFactory = new PagedResultsFactory( this );
         controlFactories.put( pageResultsFactory.getOid(), pageResultsFactory );
-        LOG.info( "Registered pre-bundled control factory: {}", pageResultsFactory.getOid() );
+        
+        if ( LOG.isInfoEnabled() )
+        {
+            LOG.info( "Registered pre-bundled control factory: {}", pageResultsFactory.getOid() );
+        }
 
         ControlFactory<PersistentSearch> persistentSearchFactory = new PersistentSearchFactory( this );
         controlFactories.put( persistentSearchFactory.getOid(), persistentSearchFactory );
-        LOG.info( "Registered pre-bundled control factory: {}", persistentSearchFactory.getOid() );
+        
+        if ( LOG.isInfoEnabled() )
+        {
+            LOG.info( "Registered pre-bundled control factory: {}", persistentSearchFactory.getOid() );
+        }
 
         ControlFactory<Subentries> subentriesFactory = new SubentriesFactory( this );
         controlFactories.put( subentriesFactory.getOid(), subentriesFactory );
-        LOG.info( "Registered pre-bundled control factory: {}", subentriesFactory.getOid() );
+        
+        if ( LOG.isInfoEnabled() )
+        {
+            LOG.info( "Registered pre-bundled control factory: {}", subentriesFactory.getOid() );
+        }
 
         ControlFactory<SortRequest> sortRequestFactory = new SortRequestFactory( this );
         controlFactories.put( sortRequestFactory.getOid(), sortRequestFactory );
-        LOG.info( "Registered pre-bundled control factory: {}", sortRequestFactory.getOid() );
+        
+        if ( LOG.isInfoEnabled() )
+        {
+            LOG.info( "Registered pre-bundled control factory: {}", sortRequestFactory.getOid() );
+        }
 
         ControlFactory<SortResponse> sortResponseFactory = new SortResponseFactory( this );
         controlFactories.put( sortResponseFactory.getOid(), sortResponseFactory );
-        LOG.info( "Registered pre-bundled control factory: {}", sortResponseFactory.getOid() );
+        
+        if ( LOG.isInfoEnabled() )
+        {
+            LOG.info( "Registered pre-bundled control factory: {}", sortResponseFactory.getOid() );
+        }
     }
 
 
diff --git a/ldap/codec/standalone/src/main/java/org/apache/directory/api/ldap/codec/standalone/CodecFactoryUtil.java b/ldap/codec/standalone/src/main/java/org/apache/directory/api/ldap/codec/standalone/CodecFactoryUtil.java
index ca85fe8..9aa56cf 100644
--- a/ldap/codec/standalone/src/main/java/org/apache/directory/api/ldap/codec/standalone/CodecFactoryUtil.java
+++ b/ldap/codec/standalone/src/main/java/org/apache/directory/api/ldap/codec/standalone/CodecFactoryUtil.java
@@ -110,90 +110,174 @@ public final class CodecFactoryUtil
         // Standard controls
         ControlFactory<Cascade> cascadeFactory = new CascadeFactory( apiService );
         controlFactories.put( cascadeFactory.getOid(), cascadeFactory );
-        LOG.info( "Registered pre-bundled control factory: {}", cascadeFactory.getOid() );
+
+        if ( LOG.isInfoEnabled() )
+        {
+            LOG.info( "Registered pre-bundled control factory: {}", cascadeFactory.getOid() );
+        }
 
         ControlFactory<EntryChange> entryChangeFactory = new EntryChangeFactory( apiService );
         controlFactories.put( entryChangeFactory.getOid(), entryChangeFactory );
-        LOG.info( "Registered pre-bundled control factory: {}", entryChangeFactory.getOid() );
+        
+        if ( LOG.isInfoEnabled() )
+        {
+            LOG.info( "Registered pre-bundled control factory: {}", entryChangeFactory.getOid() );
+        }
 
         ControlFactory<ManageDsaIT> manageDsaITFactory = new ManageDsaITFactory( apiService );
         controlFactories.put( manageDsaITFactory.getOid(), manageDsaITFactory );
-        LOG.info( "Registered pre-bundled control factory: {}", manageDsaITFactory.getOid() );
+        
+        if ( LOG.isInfoEnabled() )
+        {
+            LOG.info( "Registered pre-bundled control factory: {}", manageDsaITFactory.getOid() );
+        }
 
         ControlFactory<ProxiedAuthz> proxiedAuthzFactory = new ProxiedAuthzFactory( apiService );
         controlFactories.put( proxiedAuthzFactory.getOid(), proxiedAuthzFactory );
-        LOG.info( "Registered pre-bundled control factory: {}", proxiedAuthzFactory.getOid() );
+        
+        if ( LOG.isInfoEnabled() )
+        {
+            LOG.info( "Registered pre-bundled control factory: {}", proxiedAuthzFactory.getOid() );
+        }
 
         ControlFactory<PagedResults> pagedResultsFactory = new PagedResultsFactory( apiService );
         controlFactories.put( pagedResultsFactory.getOid(), pagedResultsFactory );
-        LOG.info( "Registered pre-bundled control factory: {}", pagedResultsFactory.getOid() );
+        
+        if ( LOG.isInfoEnabled() )
+        {
+            LOG.info( "Registered pre-bundled control factory: {}", pagedResultsFactory.getOid() );
+        }
 
         ControlFactory<PersistentSearch> persistentSearchFactory = new PersistentSearchFactory( apiService );
         controlFactories.put( persistentSearchFactory.getOid(), persistentSearchFactory );
-        LOG.info( "Registered pre-bundled control factory: {}", persistentSearchFactory.getOid() );
+        
+        if ( LOG.isInfoEnabled() )
+        {
+            LOG.info( "Registered pre-bundled control factory: {}", persistentSearchFactory.getOid() );
+        }
 
         ControlFactory<Subentries> subentriesFactory = new SubentriesFactory( apiService );
         controlFactories.put( subentriesFactory.getOid(), subentriesFactory );
-        LOG.info( "Registered pre-bundled control factory: {}", subentriesFactory.getOid() );
+        
+        if ( LOG.isInfoEnabled() )
+        {
+            LOG.info( "Registered pre-bundled control factory: {}", subentriesFactory.getOid() );
+        }
         
         ControlFactory<SortRequest> sortRequestFactory = new SortRequestFactory( apiService );
         controlFactories.put( sortRequestFactory.getOid(), sortRequestFactory );
-        LOG.info( "Registered pre-bundled control factory: {}", sortRequestFactory.getOid() );
+        
+        if ( LOG.isInfoEnabled() )
+        {
+            LOG.info( "Registered pre-bundled control factory: {}", sortRequestFactory.getOid() );
+        }
 
         ControlFactory<SortResponse> sortResponseFactory = new SortResponseFactory( apiService );
         controlFactories.put( sortResponseFactory.getOid(), sortResponseFactory );
-        LOG.info( "Registered pre-bundled control factory: {}", sortResponseFactory.getOid() );
+        
+        if ( LOG.isInfoEnabled() )
+        {
+            LOG.info( "Registered pre-bundled control factory: {}", sortResponseFactory.getOid() );
+        }
 
         // Extra controls
         ControlFactory<AdDirSync> adDirSyncFactory = new AdDirSyncFactory( apiService );
         controlFactories.put( adDirSyncFactory.getOid(), adDirSyncFactory );
-        LOG.info( "Registered pre-bundled control factory: {}", adDirSyncFactory.getOid() );
+        
+        if ( LOG.isInfoEnabled() )
+        {
+            LOG.info( "Registered pre-bundled control factory: {}", adDirSyncFactory.getOid() );
+        }
         
         ControlFactory<AdShowDeleted> adShowDeletedFactory = new AdShowDeletedFactory( apiService );
         controlFactories.put( adShowDeletedFactory.getOid(), adShowDeletedFactory );
-        LOG.info( "Registered pre-bundled control factory: {}", adShowDeletedFactory.getOid() );
+        
+        if ( LOG.isInfoEnabled() )
+        {
+            LOG.info( "Registered pre-bundled control factory: {}", adShowDeletedFactory.getOid() );
+        }
         
         ControlFactory<AdPolicyHints> adPolicyHintsFactory = new AdPolicyHintsFactory( apiService );
         controlFactories.put( adPolicyHintsFactory.getOid(), adPolicyHintsFactory );
-        LOG.info( "Registered pre-bundled control factory: {}", adPolicyHintsFactory.getOid() );
+        
+        if ( LOG.isInfoEnabled() )
+        {
+            LOG.info( "Registered pre-bundled control factory: {}", adPolicyHintsFactory.getOid() );
+        }
 
         ControlFactory<ChangeNotifications> changeNotificationsFactory = new ChangeNotificationsFactory( apiService );
         controlFactories.put( changeNotificationsFactory.getOid(), changeNotificationsFactory );
-        LOG.info( "Registered pre-bundled control factory: {}", changeNotificationsFactory.getOid() );
+        
+        if ( LOG.isInfoEnabled() )
+        {
+            LOG.info( "Registered pre-bundled control factory: {}", changeNotificationsFactory.getOid() );
+        }
 
         ControlFactory<PermissiveModify> permissiveModifyFactory = new PermissiveModifyFactory( apiService );
         controlFactories.put( permissiveModifyFactory.getOid(), permissiveModifyFactory );
-        LOG.info( "Registered pre-bundled control factory: {}", permissiveModifyFactory.getOid() );
+        
+        if ( LOG.isInfoEnabled() )
+        {
+            LOG.info( "Registered pre-bundled control factory: {}", permissiveModifyFactory.getOid() );
+        }
 
         ControlFactory<PasswordPolicy> passwordPolicyFactory = new PasswordPolicyFactory( apiService );
         controlFactories.put( passwordPolicyFactory.getOid(), passwordPolicyFactory );
-        LOG.info( "Registered pre-bundled control factory: {}", passwordPolicyFactory.getOid() );
+        
+        if ( LOG.isInfoEnabled() )
+        {
+            LOG.info( "Registered pre-bundled control factory: {}", passwordPolicyFactory.getOid() );
+        }
 
         ControlFactory<SyncDoneValue> syncDoneValueFactory = new SyncDoneValueFactory( apiService );
         controlFactories.put( syncDoneValueFactory.getOid(), syncDoneValueFactory );
-        LOG.info( "Registered pre-bundled control factory: {}", syncDoneValueFactory.getOid() );
+        
+        if ( LOG.isInfoEnabled() )
+        {
+            LOG.info( "Registered pre-bundled control factory: {}", syncDoneValueFactory.getOid() );
+        } 
 
         ControlFactory<SyncRequestValue> syncRequestValueFactory = new SyncRequestValueFactory( apiService );
         controlFactories.put( syncRequestValueFactory.getOid(), syncRequestValueFactory );
-        LOG.info( "Registered pre-bundled control factory: {}", syncRequestValueFactory.getOid() );
+        
+        if ( LOG.isInfoEnabled() )
+        {
+            LOG.info( "Registered pre-bundled control factory: {}", syncRequestValueFactory.getOid() );
+        }
 
         ControlFactory<SyncStateValue> syncStateValueFactory = new SyncStateValueFactory( apiService );
         controlFactories.put( syncStateValueFactory.getOid(), syncStateValueFactory );
-        LOG.info( "Registered pre-bundled control factory: {}", syncStateValueFactory.getOid() );
+        
+        if ( LOG.isInfoEnabled() )
+        {
+            LOG.info( "Registered pre-bundled control factory: {}", syncStateValueFactory.getOid() );
+        }
 
         ControlFactory<TransactionSpecification> transactionSpecificationFactory = new TransactionSpecificationFactory( apiService );
         controlFactories.put( transactionSpecificationFactory.getOid(), transactionSpecificationFactory );
-        LOG.info( "Registered pre-bundled control factory: {}", transactionSpecificationFactory.getOid() );
+        
+        if ( LOG.isInfoEnabled() )
+        {
+            LOG.info( "Registered pre-bundled control factory: {}", transactionSpecificationFactory.getOid() );
+        }
 
         ControlFactory<VirtualListViewRequest> virtualListViewRequestFactory = new VirtualListViewRequestFactory(
             apiService );
         controlFactories.put( virtualListViewRequestFactory.getOid(), virtualListViewRequestFactory );
-        LOG.info( "Registered pre-bundled control factory: {}", virtualListViewRequestFactory.getOid() );
+        
+        if ( LOG.isInfoEnabled() )
+        {
+            LOG.info( "Registered pre-bundled control factory: {}", virtualListViewRequestFactory.getOid() );
+        }
 
         ControlFactory<VirtualListViewResponse> virtualListViewResponseFactory = new VirtualListViewResponseFactory(
             apiService );
         controlFactories.put( virtualListViewResponseFactory.getOid(), virtualListViewResponseFactory );
-        LOG.info( "Registered pre-bundled control factory: {}", virtualListViewResponseFactory.getOid() );
+        
+        if ( LOG.isInfoEnabled() )
+        {
+            LOG.info( "Registered pre-bundled control factory: {}", virtualListViewResponseFactory.getOid() );
+        }
     }
 
 
@@ -219,43 +303,83 @@ public final class CodecFactoryUtil
     {
         CancelFactory cancelFactory = new CancelFactory( apiService );
         extendendOperationsFactories.put( cancelFactory.getOid(), cancelFactory );
-        LOG.info( "Registered pre-bundled extended operation factory: {}", cancelFactory.getOid() );
+
+        if ( LOG.isInfoEnabled() )
+        {
+            LOG.info( "Registered pre-bundled extended operation factory: {}", cancelFactory.getOid() );
+        }
 
         CertGenerationFactory certGenerationFactory = new CertGenerationFactory( apiService );
         extendendOperationsFactories.put( certGenerationFactory.getOid(), certGenerationFactory );
-        LOG.info( "Registered pre-bundled extended operation factory: {}", certGenerationFactory.getOid() );
+
+        if ( LOG.isInfoEnabled() )
+        {
+            LOG.info( "Registered pre-bundled extended operation factory: {}", certGenerationFactory.getOid() );
+        }
 
         EndTransactionFactory endTransactionFactory = new EndTransactionFactory( apiService );
         extendendOperationsFactories.put( endTransactionFactory.getOid(), endTransactionFactory );
-        LOG.info( "Registered pre-bundled extended operation factory: {}", endTransactionFactory.getOid() );
+        
+        if ( LOG.isInfoEnabled() )
+        {
+            LOG.info( "Registered pre-bundled extended operation factory: {}", endTransactionFactory.getOid() );
+        }
 
         GracefulDisconnectFactory gracefulDisconnectFactory = new GracefulDisconnectFactory( apiService );
         extendendOperationsFactories.put( gracefulDisconnectFactory.getOid(), gracefulDisconnectFactory );
-        LOG.info( "Registered pre-bundled extended operation factory: {}", gracefulDisconnectFactory.getOid() );
+        
+        if ( LOG.isInfoEnabled() )
+        {
+            LOG.info( "Registered pre-bundled extended operation factory: {}", gracefulDisconnectFactory.getOid() );
+        }
 
         GracefulShutdownFactory gracefulShutdownFactory = new GracefulShutdownFactory( apiService );
         extendendOperationsFactories.put( gracefulShutdownFactory.getOid(), gracefulShutdownFactory );
-        LOG.info( "Registered pre-bundled extended operation factory: {}", gracefulShutdownFactory.getOid() );
+        
+        if ( LOG.isInfoEnabled() )
+        {
+            LOG.info( "Registered pre-bundled extended operation factory: {}", gracefulShutdownFactory.getOid() );
+        }
 
         PasswordModifyFactory passwordModifyFactory = new PasswordModifyFactory( apiService );
         extendendOperationsFactories.put( passwordModifyFactory.getOid(), passwordModifyFactory );
-        LOG.info( "Registered pre-bundled extended operation factory: {}", passwordModifyFactory.getOid() );
+        
+        if ( LOG.isInfoEnabled() )
+        {
+            LOG.info( "Registered pre-bundled extended operation factory: {}", passwordModifyFactory.getOid() );
+        }
 
         StartTlsFactory startTlsFactory = new StartTlsFactory( apiService );
         extendendOperationsFactories.put( startTlsFactory.getOid(), startTlsFactory );
-        LOG.info( "Registered pre-bundled extended operation factory: {}", startTlsFactory.getOid() );
+        
+        if ( LOG.isInfoEnabled() )
+        {
+            LOG.info( "Registered pre-bundled extended operation factory: {}", startTlsFactory.getOid() );
+        }
 
         StartTransactionFactory startTransactionFactory = new StartTransactionFactory( apiService );
         extendendOperationsFactories.put( startTransactionFactory.getOid(), startTransactionFactory );
-        LOG.info( "Registered pre-bundled extended operation factory: {}", startTransactionFactory.getOid() );
+        
+        if ( LOG.isInfoEnabled() )
+        {
+            LOG.info( "Registered pre-bundled extended operation factory: {}", startTransactionFactory.getOid() );
+        }
 
         StoredProcedureFactory storedProcedureFactory = new StoredProcedureFactory( apiService );
         extendendOperationsFactories.put( storedProcedureFactory.getOid(), storedProcedureFactory );
-        LOG.info( "Registered pre-bundled extended operation factory: {}", storedProcedureFactory.getOid() );
+        
+        if ( LOG.isInfoEnabled() )
+        {
+            LOG.info( "Registered pre-bundled extended operation factory: {}", storedProcedureFactory.getOid() );
+        }
 
         WhoAmIFactory whoAmIFactory = new WhoAmIFactory( apiService );
         extendendOperationsFactories.put( whoAmIFactory.getOid(), whoAmIFactory );
-        LOG.info( "Registered pre-bundled extended operation factory: {}", whoAmIFactory.getOid() );
+        
+        if ( LOG.isInfoEnabled() )
+        {
+            LOG.info( "Registered pre-bundled extended operation factory: {}", whoAmIFactory.getOid() );
+        }
     }
 
 
@@ -273,6 +397,10 @@ public final class CodecFactoryUtil
     {
         SyncInfoValueFactory syncInfoValueFactory = new SyncInfoValueFactory( apiService );
         intermediateResponseFactories.put( syncInfoValueFactory.getOid(), syncInfoValueFactory );
-        LOG.info( "Registered pre-bundled intermediate response factory: {}", syncInfoValueFactory.getOid() );
+        
+        if ( LOG.isInfoEnabled() )
+        {
+            LOG.info( "Registered pre-bundled intermediate response factory: {}", syncInfoValueFactory.getOid() );
+        }
     }
 }
diff --git a/ldap/codec/standalone/src/main/java/org/apache/directory/api/ldap/codec/standalone/StandaloneLdapApiService.java b/ldap/codec/standalone/src/main/java/org/apache/directory/api/ldap/codec/standalone/StandaloneLdapApiService.java
index 8be7e98..cf951ae 100644
--- a/ldap/codec/standalone/src/main/java/org/apache/directory/api/ldap/codec/standalone/StandaloneLdapApiService.java
+++ b/ldap/codec/standalone/src/main/java/org/apache/directory/api/ldap/codec/standalone/StandaloneLdapApiService.java
@@ -326,7 +326,11 @@ public class StandaloneLdapApiService extends DefaultLdapCodecService
     {
         if ( getControlFactories().containsKey( controlFQCN ) )
         {
-            LOG.debug( "Factory for control {} was already loaded", controlFQCN );
+            if ( LOG.isDebugEnabled() )
+            {
+                LOG.debug( "Factory for control {} was already loaded", controlFQCN );
+            }
+            
             return;
         }
 
@@ -342,7 +346,10 @@ public class StandaloneLdapApiService extends DefaultLdapCodecService
         ControlFactory<?> factory = ( ControlFactory<?> ) constructor.newInstance( this );
         getControlFactories().put( factory.getOid(), factory );
 
-        LOG.info( "Registered control factory: {}", factory.getOid() );
+        if ( LOG.isInfoEnabled() )
+        {
+            LOG.info( "Registered control factory: {}", factory.getOid() );
+        }
     }
 
 
@@ -369,7 +376,11 @@ public class StandaloneLdapApiService extends DefaultLdapCodecService
     {
         if ( getExtendedOperationFactories().containsKey( extendedOperationFQCN ) )
         {
-            LOG.debug( "Factory for extended operation {} was already loaded", extendedOperationFQCN );
+            if ( LOG.isDebugEnabled() )
+            {
+                LOG.debug( "Factory for extended operation {} was already loaded", extendedOperationFQCN );
+            }
+            
             return;
         }
 
@@ -388,7 +399,10 @@ public class StandaloneLdapApiService extends DefaultLdapCodecService
                 { this } );
         getExtendedOperationFactories().put( factory.getOid(), factory );
 
-        LOG.info( "Registered pre-bundled extended operation factory: {}", factory.getOid() );
+        if ( LOG.isInfoEnabled() )
+        {
+            LOG.info( "Registered pre-bundled extended operation factory: {}", factory.getOid() );
+        }
     }
 
 
@@ -415,7 +429,11 @@ public class StandaloneLdapApiService extends DefaultLdapCodecService
     {
         if ( getIntermediateResponseFactories().containsKey( intermediateResponseFQCN ) )
         {
-            LOG.debug( "Factory for Intermediate Response {} was already loaded", intermediateResponseFQCN );
+            if ( LOG.isDebugEnabled() )
+            {
+                LOG.debug( "Factory for Intermediate Response {} was already loaded", intermediateResponseFQCN );
+            }
+            
             return;
         }
 
@@ -433,6 +451,9 @@ public class StandaloneLdapApiService extends DefaultLdapCodecService
             .newInstance( this );
         getIntermediateResponseFactories().put( factory.getOid(), factory );
 
-        LOG.info( "Registered pre-bundled Intermediate Response factory: {}", factory.getOid() );
+        if ( LOG.isInfoEnabled() )
+        {
+            LOG.info( "Registered pre-bundled Intermediate Response factory: {}", factory.getOid() );
+        }
     }
 }
diff --git a/ldap/extras/codec/src/main/java/org/apache/directory/api/ldap/extras/controls/ad_impl/AdDirSyncGrammar.java b/ldap/extras/codec/src/main/java/org/apache/directory/api/ldap/extras/controls/ad_impl/AdDirSyncGrammar.java
index cf35f7c..81e2189 100644
--- a/ldap/extras/codec/src/main/java/org/apache/directory/api/ldap/extras/controls/ad_impl/AdDirSyncGrammar.java
+++ b/ldap/extras/codec/src/main/java/org/apache/directory/api/ldap/extras/controls/ad_impl/AdDirSyncGrammar.java
@@ -59,9 +59,6 @@ public final class AdDirSyncGrammar extends AbstractGrammar<AdDirSyncContainer>
     /** the logger */
     private static final Logger LOG = LoggerFactory.getLogger( AdDirSyncGrammar.class );
 
-    /** speedup for logger */
-    private static final boolean IS_DEBUG = LOG.isDebugEnabled();
-
     /** AdDirSyncControlGrammar singleton instance */
     private static final AdDirSyncGrammar INSTANCE = new AdDirSyncGrammar();
 
@@ -127,7 +124,7 @@ public final class AdDirSyncGrammar extends AbstractGrammar<AdDirSyncContainer>
                                 throw new DecoderException( msg );
                             }
                             
-                            if ( IS_DEBUG )
+                            if ( LOG.isDebugEnabled() )
                             {
                                 LOG.debug( "flags = {}", flags.toString() );
                             }
@@ -166,7 +163,7 @@ public final class AdDirSyncGrammar extends AbstractGrammar<AdDirSyncContainer>
                         {
                             int maxReturnLength = IntegerDecoder.parse( value );
                             
-                            if ( IS_DEBUG )
+                            if ( LOG.isDebugEnabled() )
                             {
                                 LOG.debug( "maxReturnLength = {}", maxReturnLength );
                             }
@@ -202,7 +199,7 @@ public final class AdDirSyncGrammar extends AbstractGrammar<AdDirSyncContainer>
 
                         byte[] cookie = value.getData();
 
-                        if ( IS_DEBUG )
+                        if ( LOG.isDebugEnabled() )
                         {
                             LOG.debug( "cookie = {}", Strings.dumpBytes( cookie ) );
                         }
diff --git a/ldap/extras/codec/src/main/java/org/apache/directory/api/ldap/extras/controls/ad_impl/AdPolicyHintsGrammar.java b/ldap/extras/codec/src/main/java/org/apache/directory/api/ldap/extras/controls/ad_impl/AdPolicyHintsGrammar.java
index 9f659f5..bc03c98 100644
--- a/ldap/extras/codec/src/main/java/org/apache/directory/api/ldap/extras/controls/ad_impl/AdPolicyHintsGrammar.java
+++ b/ldap/extras/codec/src/main/java/org/apache/directory/api/ldap/extras/controls/ad_impl/AdPolicyHintsGrammar.java
@@ -37,8 +37,6 @@ public final class AdPolicyHintsGrammar extends AbstractGrammar<AdPolicyHintsCon
 {
     static final Logger LOG = LoggerFactory.getLogger( AdPolicyHintsGrammar.class );
 
-    static final boolean IS_DEBUG = LOG.isDebugEnabled();
-
     private static Grammar<?> instance = new AdPolicyHintsGrammar();
 
 
diff --git a/ldap/extras/codec/src/main/java/org/apache/directory/api/ldap/extras/controls/ppolicy_impl/PPolicyInit.java b/ldap/extras/codec/src/main/java/org/apache/directory/api/ldap/extras/controls/ppolicy_impl/PPolicyInit.java
index e2debcb..3906a58 100644
--- a/ldap/extras/codec/src/main/java/org/apache/directory/api/ldap/extras/controls/ppolicy_impl/PPolicyInit.java
+++ b/ldap/extras/codec/src/main/java/org/apache/directory/api/ldap/extras/controls/ppolicy_impl/PPolicyInit.java
@@ -36,10 +36,6 @@ public class PPolicyInit extends GrammarAction<PasswordPolicyContainer>
     /** The logger */
     private static final Logger LOG = LoggerFactory.getLogger( PPolicyInit.class );
 
-    /** Speedup for logs */
-    private static final boolean IS_DEBUG = LOG.isDebugEnabled();
-
-
     /**
      * Instantiates a new PPolicyInit action.
      */
@@ -57,7 +53,7 @@ public class PPolicyInit extends GrammarAction<PasswordPolicyContainer>
         // As all the values are optional or defaulted, we can end here
         container.setGrammarEndAllowed( true );
 
-        if ( IS_DEBUG )
+        if ( LOG.isDebugEnabled() )
         {
             LOG.debug( "PasswordPolicyResponseControlContainer initialized" );
         }
diff --git a/ldap/extras/codec/src/main/java/org/apache/directory/api/ldap/extras/controls/syncrepl_impl/SyncDoneValueGrammar.java b/ldap/extras/codec/src/main/java/org/apache/directory/api/ldap/extras/controls/syncrepl_impl/SyncDoneValueGrammar.java
index e7a3ea7..562ef5b 100644
--- a/ldap/extras/codec/src/main/java/org/apache/directory/api/ldap/extras/controls/syncrepl_impl/SyncDoneValueGrammar.java
+++ b/ldap/extras/codec/src/main/java/org/apache/directory/api/ldap/extras/controls/syncrepl_impl/SyncDoneValueGrammar.java
@@ -56,9 +56,6 @@ public final class SyncDoneValueGrammar extends AbstractGrammar<SyncDoneValueCon
     /** the logger */
     private static final Logger LOG = LoggerFactory.getLogger( SyncDoneValueGrammar.class );
 
-    /** speedup for logger */
-    private static final boolean IS_DEBUG = LOG.isDebugEnabled();
-
     /** SyncDoneValueControlGrammar singleton instance */
     private static final SyncDoneValueGrammar INSTANCE = new SyncDoneValueGrammar();
 
@@ -113,7 +110,7 @@ public final class SyncDoneValueGrammar extends AbstractGrammar<SyncDoneValueCon
 
                         byte[] cookie = value.getData();
 
-                        if ( IS_DEBUG )
+                        if ( LOG.isDebugEnabled() )
                         {
                             LOG.debug( "cookie = {}", Strings.dumpBytes( cookie ) );
                         }
@@ -135,7 +132,7 @@ public final class SyncDoneValueGrammar extends AbstractGrammar<SyncDoneValueCon
                     {
                         boolean refreshDeletes = BooleanDecoder.parse( value );
 
-                        if ( IS_DEBUG )
+                        if ( LOG.isDebugEnabled() )
                         {
                             LOG.debug( "refreshDeletes = {}", refreshDeletes );
                         }
diff --git a/ldap/extras/codec/src/main/java/org/apache/directory/api/ldap/extras/controls/syncrepl_impl/SyncRequestValueGrammar.java b/ldap/extras/codec/src/main/java/org/apache/directory/api/ldap/extras/controls/syncrepl_impl/SyncRequestValueGrammar.java
index 520225c..f62e167 100644
--- a/ldap/extras/codec/src/main/java/org/apache/directory/api/ldap/extras/controls/syncrepl_impl/SyncRequestValueGrammar.java
+++ b/ldap/extras/codec/src/main/java/org/apache/directory/api/ldap/extras/controls/syncrepl_impl/SyncRequestValueGrammar.java
@@ -62,9 +62,6 @@ public final class SyncRequestValueGrammar extends AbstractGrammar<SyncRequestVa
     /** The logger */
     static final Logger LOG = LoggerFactory.getLogger( SyncRequestValueGrammar.class );
 
-    /** Speedup for logs */
-    static final boolean IS_DEBUG = LOG.isDebugEnabled();
-
     /** The instance of grammar. SyncRequestValueControlGrammar is a singleton */
     private static Grammar<SyncRequestValueContainer> instance = new SyncRequestValueGrammar();
 
@@ -127,7 +124,7 @@ public final class SyncRequestValueGrammar extends AbstractGrammar<SyncRequestVa
 
                             SynchronizationModeEnum modeEnum = SynchronizationModeEnum.getSyncMode( mode );
 
-                            if ( IS_DEBUG )
+                            if ( LOG.isDebugEnabled() )
                             {
                                 LOG.debug( "Mode = " + modeEnum );
                             }
@@ -166,7 +163,7 @@ public final class SyncRequestValueGrammar extends AbstractGrammar<SyncRequestVa
 
                         byte[] cookie = value.getData();
 
-                        if ( IS_DEBUG )
+                        if ( LOG.isDebugEnabled() )
                         {
                             LOG.debug( "cookie = " + Strings.dumpBytes( cookie ) );
                         }
@@ -200,7 +197,7 @@ public final class SyncRequestValueGrammar extends AbstractGrammar<SyncRequestVa
                         {
                             boolean reloadHint = BooleanDecoder.parse( value );
 
-                            if ( IS_DEBUG )
+                            if ( LOG.isDebugEnabled() )
                             {
                                 LOG.debug( "reloadHint = " + reloadHint );
                             }
@@ -241,7 +238,7 @@ public final class SyncRequestValueGrammar extends AbstractGrammar<SyncRequestVa
                         {
                             boolean reloadHint = BooleanDecoder.parse( value );
 
-                            if ( IS_DEBUG )
+                            if ( LOG.isDebugEnabled() )
                             {
                                 LOG.debug( "reloadHint = " + reloadHint );
                             }
diff --git a/ldap/extras/codec/src/main/java/org/apache/directory/api/ldap/extras/controls/syncrepl_impl/SyncStateValueGrammar.java b/ldap/extras/codec/src/main/java/org/apache/directory/api/ldap/extras/controls/syncrepl_impl/SyncStateValueGrammar.java
index 3577811..d773868 100644
--- a/ldap/extras/codec/src/main/java/org/apache/directory/api/ldap/extras/controls/syncrepl_impl/SyncStateValueGrammar.java
+++ b/ldap/extras/codec/src/main/java/org/apache/directory/api/ldap/extras/controls/syncrepl_impl/SyncStateValueGrammar.java
@@ -60,9 +60,6 @@ public final class SyncStateValueGrammar extends AbstractGrammar<SyncStateValueC
     /** The logger */
     static final Logger LOG = LoggerFactory.getLogger( SyncStateValueGrammar.class );
 
-    /** Speedup for logs */
-    static final boolean IS_DEBUG = LOG.isDebugEnabled();
-
     /** The instance of grammar. SyncStateValueControlGrammar is a singleton */
     private static Grammar<SyncStateValueContainer> instance = new SyncStateValueGrammar();
 
@@ -120,7 +117,7 @@ public final class SyncStateValueGrammar extends AbstractGrammar<SyncStateValueC
 
                         SyncStateTypeEnum syncStateTypeEnum = SyncStateTypeEnum.getSyncStateType( syncStateType );
 
-                        if ( IS_DEBUG )
+                        if ( LOG.isDebugEnabled() )
                         {
                             LOG.debug( "SyncStateType = {}", syncStateTypeEnum );
                         }
@@ -159,7 +156,7 @@ public final class SyncStateValueGrammar extends AbstractGrammar<SyncStateValueC
 
                     byte[] entryUUID = value.getData();
 
-                    if ( IS_DEBUG )
+                    if ( LOG.isDebugEnabled() )
                     {
                         LOG.debug( "entryUUID = {}", Strings.dumpBytes( entryUUID ) );
                     }
@@ -191,7 +188,7 @@ public final class SyncStateValueGrammar extends AbstractGrammar<SyncStateValueC
 
                     byte[] cookie = value.getData();
 
-                    if ( IS_DEBUG )
+                    if ( LOG.isDebugEnabled() )
                     {
                         LOG.debug( "cookie = {}", cookie );
                     }
diff --git a/ldap/extras/codec/src/main/java/org/apache/directory/api/ldap/extras/controls/vlv_impl/InitByOffsetSequence.java b/ldap/extras/codec/src/main/java/org/apache/directory/api/ldap/extras/controls/vlv_impl/InitByOffsetSequence.java
index 804e5a0..dad7ffa 100644
--- a/ldap/extras/codec/src/main/java/org/apache/directory/api/ldap/extras/controls/vlv_impl/InitByOffsetSequence.java
+++ b/ldap/extras/codec/src/main/java/org/apache/directory/api/ldap/extras/controls/vlv_impl/InitByOffsetSequence.java
@@ -36,10 +36,6 @@ public class InitByOffsetSequence extends GrammarAction<VirtualListViewRequestCo
     /** The logger */
     private static final Logger LOG = LoggerFactory.getLogger( InitByOffsetSequence.class );
 
-    /** Speedup for logs */
-    private static final boolean IS_DEBUG = LOG.isDebugEnabled();
-
-
     /**
      * Instantiates a new ByOffsetSequence action.
      */
@@ -54,7 +50,7 @@ public class InitByOffsetSequence extends GrammarAction<VirtualListViewRequestCo
      */
     public void action( VirtualListViewRequestContainer container ) throws DecoderException
     {
-        if ( IS_DEBUG )
+        if ( LOG.isDebugEnabled() )
         {
             LOG.debug( "VirtualListViewRequestContainer initialized" );
         }
diff --git a/ldap/extras/codec/src/main/java/org/apache/directory/api/ldap/extras/controls/vlv_impl/InitVirtualListViewRequest.java b/ldap/extras/codec/src/main/java/org/apache/directory/api/ldap/extras/controls/vlv_impl/InitVirtualListViewRequest.java
index 9f46901..8fb2472 100644
--- a/ldap/extras/codec/src/main/java/org/apache/directory/api/ldap/extras/controls/vlv_impl/InitVirtualListViewRequest.java
+++ b/ldap/extras/codec/src/main/java/org/apache/directory/api/ldap/extras/controls/vlv_impl/InitVirtualListViewRequest.java
@@ -36,10 +36,6 @@ public class InitVirtualListViewRequest extends GrammarAction<VirtualListViewReq
     /** The logger */
     private static final Logger LOG = LoggerFactory.getLogger( InitVirtualListViewRequest.class );
 
-    /** Speedup for logs */
-    private static final boolean IS_DEBUG = LOG.isDebugEnabled();
-
-
     /**
      * Instantiates a new VirtualListViewRequest action.
      */
@@ -54,7 +50,7 @@ public class InitVirtualListViewRequest extends GrammarAction<VirtualListViewReq
      */
     public void action( VirtualListViewRequestContainer container ) throws DecoderException
     {
-        if ( IS_DEBUG )
+        if ( LOG.isDebugEnabled() )
         {
             LOG.debug( "VirtualListViewRequestContainer initialized" );
         }
diff --git a/ldap/extras/codec/src/main/java/org/apache/directory/api/ldap/extras/controls/vlv_impl/VirtualListViewRequestGrammar.java b/ldap/extras/codec/src/main/java/org/apache/directory/api/ldap/extras/controls/vlv_impl/VirtualListViewRequestGrammar.java
index c773297..7adfe0a 100644
--- a/ldap/extras/codec/src/main/java/org/apache/directory/api/ldap/extras/controls/vlv_impl/VirtualListViewRequestGrammar.java
+++ b/ldap/extras/codec/src/main/java/org/apache/directory/api/ldap/extras/controls/vlv_impl/VirtualListViewRequestGrammar.java
@@ -38,8 +38,6 @@ public final class VirtualListViewRequestGrammar extends AbstractGrammar<Virtual
 {
     static final Logger LOG = LoggerFactory.getLogger( VirtualListViewRequestGrammar.class );
 
-    static final boolean IS_DEBUG = LOG.isDebugEnabled();
-
     private static Grammar<?> instance = new VirtualListViewRequestGrammar();
 
 
diff --git a/ldap/extras/codec/src/main/java/org/apache/directory/api/ldap/extras/controls/vlv_impl/VirtualListViewResponseGrammar.java b/ldap/extras/codec/src/main/java/org/apache/directory/api/ldap/extras/controls/vlv_impl/VirtualListViewResponseGrammar.java
index 1471be1..3020747 100644
--- a/ldap/extras/codec/src/main/java/org/apache/directory/api/ldap/extras/controls/vlv_impl/VirtualListViewResponseGrammar.java
+++ b/ldap/extras/codec/src/main/java/org/apache/directory/api/ldap/extras/controls/vlv_impl/VirtualListViewResponseGrammar.java
@@ -61,8 +61,6 @@ public final class VirtualListViewResponseGrammar extends AbstractGrammar<Virtua
 {
     static final Logger LOG = LoggerFactory.getLogger( VirtualListViewResponseGrammar.class );
 
-    static final boolean IS_DEBUG = LOG.isDebugEnabled();
-
     private static Grammar<?> instance = new VirtualListViewResponseGrammar();
 
 
diff --git a/ldap/extras/codec/src/main/java/org/apache/directory/api/ldap/extras/extended/ads_impl/cancel/CancelGrammar.java b/ldap/extras/codec/src/main/java/org/apache/directory/api/ldap/extras/extended/ads_impl/cancel/CancelGrammar.java
index 3cc0cb8..8bd5bd7 100644
--- a/ldap/extras/codec/src/main/java/org/apache/directory/api/ldap/extras/extended/ads_impl/cancel/CancelGrammar.java
+++ b/ldap/extras/codec/src/main/java/org/apache/directory/api/ldap/extras/extended/ads_impl/cancel/CancelGrammar.java
@@ -56,9 +56,6 @@ public final class CancelGrammar extends AbstractGrammar<CancelContainer>
     /** The logger */
     static final Logger LOG = LoggerFactory.getLogger( CancelGrammar.class );
 
-    /** Speedup for logs */
-    static final boolean IS_DEBUG = LOG.isDebugEnabled();
-
     /** The instance of grammar. CancelGrammar is a singleton */
     private static Grammar<CancelContainer> instance = new CancelGrammar();
 
@@ -120,7 +117,7 @@ public final class CancelGrammar extends AbstractGrammar<CancelContainer>
                         {
                             int cancelId = IntegerDecoder.parse( value, 0, Integer.MAX_VALUE );
 
-                            if ( IS_DEBUG )
+                            if ( LOG.isDebugEnabled() )
                             {
                                 LOG.debug( "CancelId = " + cancelId );
                             }
diff --git a/ldap/extras/codec/src/main/java/org/apache/directory/api/ldap/extras/extended/ads_impl/certGeneration/CertGenerationGrammar.java b/ldap/extras/codec/src/main/java/org/apache/directory/api/ldap/extras/extended/ads_impl/certGeneration/CertGenerationGrammar.java
index 7cf0c21..1765937 100644
--- a/ldap/extras/codec/src/main/java/org/apache/directory/api/ldap/extras/extended/ads_impl/certGeneration/CertGenerationGrammar.java
+++ b/ldap/extras/codec/src/main/java/org/apache/directory/api/ldap/extras/extended/ads_impl/certGeneration/CertGenerationGrammar.java
@@ -60,9 +60,6 @@ public class CertGenerationGrammar extends AbstractGrammar<CertGenerationContain
     /** logger */
     private static final Logger LOG = LoggerFactory.getLogger( CertGenerationGrammar.class );
 
-    /** Speedup for logs */
-    static final boolean IS_DEBUG = LOG.isDebugEnabled();
-
     /** The instance of grammar. CertGenerationObjectGrammar is a singleton */
     private static Grammar<CertGenerationContainer> instance = new CertGenerationGrammar();
 
@@ -122,7 +119,7 @@ public class CertGenerationGrammar extends AbstractGrammar<CertGenerationContain
 
                         String targetDN = Strings.utf8ToString( value.getData() );
 
-                        if ( IS_DEBUG )
+                        if ( LOG.isDebugEnabled() )
                         {
                             LOG.debug( "Target Dn = " + targetDN );
                         }
@@ -168,7 +165,7 @@ public class CertGenerationGrammar extends AbstractGrammar<CertGenerationContain
 
                         String issuerDN = Strings.utf8ToString( value.getData() );
 
-                        if ( IS_DEBUG )
+                        if ( LOG.isDebugEnabled() )
                         {
                             LOG.debug( "Issuer Dn = " + issuerDN );
                         }
@@ -208,7 +205,7 @@ public class CertGenerationGrammar extends AbstractGrammar<CertGenerationContain
 
                         String subjectDN = Strings.utf8ToString( value.getData() );
 
-                        if ( IS_DEBUG )
+                        if ( LOG.isDebugEnabled() )
                         {
                             LOG.debug( "subject Dn = " + subjectDN );
                         }
@@ -254,7 +251,7 @@ public class CertGenerationGrammar extends AbstractGrammar<CertGenerationContain
 
                         String keyAlgorithm = Strings.utf8ToString( value.getData() );
 
-                        if ( IS_DEBUG )
+                        if ( LOG.isDebugEnabled() )
                         {
                             LOG.debug( "key algorithm = " + keyAlgorithm );
                         }
diff --git a/ldap/extras/codec/src/main/java/org/apache/directory/api/ldap/extras/extended/ads_impl/endTransaction/EndTransactionRequestGrammar.java b/ldap/extras/codec/src/main/java/org/apache/directory/api/ldap/extras/extended/ads_impl/endTransaction/EndTransactionRequestGrammar.java
index 610e8d5..c9cd9d7 100644
--- a/ldap/extras/codec/src/main/java/org/apache/directory/api/ldap/extras/extended/ads_impl/endTransaction/EndTransactionRequestGrammar.java
+++ b/ldap/extras/codec/src/main/java/org/apache/directory/api/ldap/extras/extended/ads_impl/endTransaction/EndTransactionRequestGrammar.java
@@ -59,9 +59,6 @@ public class EndTransactionRequestGrammar extends AbstractGrammar<EndTransaction
     /** logger */
     private static final Logger LOG = LoggerFactory.getLogger( EndTransactionRequestGrammar.class );
 
-    /** Speedup for logs */
-    static final boolean IS_DEBUG = LOG.isDebugEnabled();
-
     /** The instance of grammar. EndTransactionRequestGrammar is a singleton */
     private static Grammar<EndTransactionRequestContainer> instance = new EndTransactionRequestGrammar();
 
@@ -157,7 +154,7 @@ public class EndTransactionRequestGrammar extends AbstractGrammar<EndTransaction
 
                         byte[] identifier = value.getData();
 
-                        if ( IS_DEBUG )
+                        if ( LOG.isDebugEnabled() )
                         {
                             LOG.debug( "Identifier = {}", Strings.dumpBytes( identifier ) );
                         }
@@ -196,7 +193,7 @@ public class EndTransactionRequestGrammar extends AbstractGrammar<EndTransaction
 
                         byte[] identifier = value.getData();
 
-                        if ( IS_DEBUG )
+                        if ( LOG.isDebugEnabled() )
                         {
                             LOG.debug( "Identifier = {}", Strings.dumpBytes( identifier ) );
                         }
diff --git a/ldap/extras/codec/src/main/java/org/apache/directory/api/ldap/extras/extended/ads_impl/endTransaction/EndTransactionResponseGrammar.java b/ldap/extras/codec/src/main/java/org/apache/directory/api/ldap/extras/extended/ads_impl/endTransaction/EndTransactionResponseGrammar.java
index 1a570f0..7de1d99 100644
--- a/ldap/extras/codec/src/main/java/org/apache/directory/api/ldap/extras/extended/ads_impl/endTransaction/EndTransactionResponseGrammar.java
+++ b/ldap/extras/codec/src/main/java/org/apache/directory/api/ldap/extras/extended/ads_impl/endTransaction/EndTransactionResponseGrammar.java
@@ -67,9 +67,6 @@ public class EndTransactionResponseGrammar extends AbstractGrammar<EndTransactio
     /** logger */
     private static final Logger LOG = LoggerFactory.getLogger( EndTransactionResponseGrammar.class );
 
-    /** Speedup for logs */
-    static final boolean IS_DEBUG = LOG.isDebugEnabled();
-
     /** The instance of grammar. EndTransactionResponseGrammar is a singleton */
     private static Grammar<EndTransactionResponseContainer> instance = new EndTransactionResponseGrammar();
 
diff --git a/ldap/extras/codec/src/main/java/org/apache/directory/api/ldap/extras/extended/ads_impl/endTransaction/controls/ControlsGrammar.java b/ldap/extras/codec/src/main/java/org/apache/directory/api/ldap/extras/extended/ads_impl/endTransaction/controls/ControlsGrammar.java
index d9e3b2c..0b8ab50 100644
--- a/ldap/extras/codec/src/main/java/org/apache/directory/api/ldap/extras/extended/ads_impl/endTransaction/controls/ControlsGrammar.java
+++ b/ldap/extras/codec/src/main/java/org/apache/directory/api/ldap/extras/extended/ads_impl/endTransaction/controls/ControlsGrammar.java
@@ -46,9 +46,6 @@ public class ControlsGrammar extends AbstractGrammar<ControlsContainer>
     /** logger */
     private static final Logger LOG = LoggerFactory.getLogger( ControlsGrammar.class );
 
-    /** Speedup for logs */
-    static final boolean IS_DEBUG = LOG.isDebugEnabled();
-
     /** The instance of grammar. ControlsGrammar is a singleton */
     private static Grammar<ControlsContainer> instance = new ControlsGrammar();
 
diff --git a/ldap/extras/codec/src/main/java/org/apache/directory/api/ldap/extras/extended/ads_impl/endTransaction/controls/actions/AddControl.java b/ldap/extras/codec/src/main/java/org/apache/directory/api/ldap/extras/extended/ads_impl/endTransaction/controls/actions/AddControl.java
index 37c9451..aa3f76b 100644
--- a/ldap/extras/codec/src/main/java/org/apache/directory/api/ldap/extras/extended/ads_impl/endTransaction/controls/actions/AddControl.java
+++ b/ldap/extras/codec/src/main/java/org/apache/directory/api/ldap/extras/extended/ads_impl/endTransaction/controls/actions/AddControl.java
@@ -47,10 +47,6 @@ public class AddControl extends GrammarAction<ControlsContainer>
     /** The logger */
     private static final Logger LOG = LoggerFactory.getLogger( AddControl.class );
 
-    /** Speedup for logs */
-    private static final boolean IS_DEBUG = LOG.isDebugEnabled();
-
-
     /**
      * Instantiates a new AddControl action.
      */
@@ -99,7 +95,7 @@ public class AddControl extends GrammarAction<ControlsContainer>
         // We can have an END transition
         container.setGrammarEndAllowed( true );
 
-        if ( IS_DEBUG )
+        if ( LOG.isDebugEnabled() )
         {
             LOG.debug( "Control OID : {}", oidValue );
         }
diff --git a/ldap/extras/codec/src/main/java/org/apache/directory/api/ldap/extras/extended/ads_impl/endTransaction/controls/actions/StoreControlCriticality.java b/ldap/extras/codec/src/main/java/org/apache/directory/api/ldap/extras/extended/ads_impl/endTransaction/controls/actions/StoreControlCriticality.java
index ad5fe5a..1517c5b 100644
--- a/ldap/extras/codec/src/main/java/org/apache/directory/api/ldap/extras/extended/ads_impl/endTransaction/controls/actions/StoreControlCriticality.java
+++ b/ldap/extras/codec/src/main/java/org/apache/directory/api/ldap/extras/extended/ads_impl/endTransaction/controls/actions/StoreControlCriticality.java
@@ -50,10 +50,6 @@ public class StoreControlCriticality extends GrammarAction<ControlsContainer>
     /** The logger */
     private static final Logger LOG = LoggerFactory.getLogger( StoreControlCriticality.class );
 
-    /** Speedup for logs */
-    private static final boolean IS_DEBUG = LOG.isDebugEnabled();
-
-
     /**
      * Instantiates a new StoreControlCriticality action.
      */
@@ -98,7 +94,7 @@ public class StoreControlCriticality extends GrammarAction<ControlsContainer>
         // We can have an END transition
         container.setGrammarEndAllowed( true );
 
-        if ( IS_DEBUG )
+        if ( LOG.isDebugEnabled() )
         {
             LOG.debug( "Control criticality : {}", control.isCritical() );
         }
diff --git a/ldap/extras/codec/src/main/java/org/apache/directory/api/ldap/extras/extended/ads_impl/endTransaction/controls/actions/StoreControlValue.java b/ldap/extras/codec/src/main/java/org/apache/directory/api/ldap/extras/extended/ads_impl/endTransaction/controls/actions/StoreControlValue.java
index bbe35a3..114b5db 100644
--- a/ldap/extras/codec/src/main/java/org/apache/directory/api/ldap/extras/extended/ads_impl/endTransaction/controls/actions/StoreControlValue.java
+++ b/ldap/extras/codec/src/main/java/org/apache/directory/api/ldap/extras/extended/ads_impl/endTransaction/controls/actions/StoreControlValue.java
@@ -47,10 +47,6 @@ public class StoreControlValue extends GrammarAction<ControlsContainer>
     /** The logger */
     private static final Logger LOG = LoggerFactory.getLogger( StoreControlValue.class );
 
-    /** Speedup for logs */
-    private static final boolean IS_DEBUG = LOG.isDebugEnabled();
-
-
     /**
      * Instantiates a new StoreControlValue action.
      */
@@ -86,7 +82,7 @@ public class StoreControlValue extends GrammarAction<ControlsContainer>
         // We can have an END transition
         container.setGrammarEndAllowed( true );
 
-        if ( IS_DEBUG )
+        if ( LOG.isDebugEnabled() )
         {
             LOG.debug( "Control value : {}", Strings.dumpBytes( control.getValue() ) );
         }
diff --git a/ldap/extras/codec/src/main/java/org/apache/directory/api/ldap/extras/extended/ads_impl/gracefulDisconnect/GracefulDisconnectGrammar.java b/ldap/extras/codec/src/main/java/org/apache/directory/api/ldap/extras/extended/ads_impl/gracefulDisconnect/GracefulDisconnectGrammar.java
index c8eb197..8050f50 100644
--- a/ldap/extras/codec/src/main/java/org/apache/directory/api/ldap/extras/extended/ads_impl/gracefulDisconnect/GracefulDisconnectGrammar.java
+++ b/ldap/extras/codec/src/main/java/org/apache/directory/api/ldap/extras/extended/ads_impl/gracefulDisconnect/GracefulDisconnectGrammar.java
@@ -64,9 +64,6 @@ public final class GracefulDisconnectGrammar extends AbstractGrammar<GracefulDis
     /** The logger */
     static final Logger LOG = LoggerFactory.getLogger( GracefulDisconnectGrammar.class );
 
-    /** Speedup for logs */
-    static final boolean IS_DEBUG = LOG.isDebugEnabled();
-
     /** The instance of grammar. GracefulDisconnectnGrammar is a singleton */
     private static GracefulDisconnectGrammar instance = new GracefulDisconnectGrammar();
 
@@ -84,7 +81,7 @@ public final class GracefulDisconnectGrammar extends AbstractGrammar<GracefulDis
                 {
                     int delay = IntegerDecoder.parse( value, 0, 86400 );
 
-                    if ( IS_DEBUG )
+                    if ( LOG.isDebugEnabled() )
                     {
                         LOG.debug( "Delay = " + delay );
                     }
@@ -126,7 +123,7 @@ public final class GracefulDisconnectGrammar extends AbstractGrammar<GracefulDis
                     container.getGracefulDisconnectResponse().addReplicatedContexts( url );
                     container.setGrammarEndAllowed( true );
 
-                    if ( IS_DEBUG )
+                    if ( LOG.isDebugEnabled() )
                     {
                         LOG.debug( "Stores a referral : {}", ldapUrl );
                     }
@@ -154,7 +151,7 @@ public final class GracefulDisconnectGrammar extends AbstractGrammar<GracefulDis
                 {
                     int timeOffline = IntegerDecoder.parse( value, 0, 720 );
 
-                    if ( IS_DEBUG )
+                    if ( LOG.isDebugEnabled() )
                     {
                         LOG.debug( "Time Offline = " + timeOffline );
                     }
diff --git a/ldap/extras/codec/src/main/java/org/apache/directory/api/ldap/extras/extended/ads_impl/gracefulShutdown/GracefulShutdownGrammar.java b/ldap/extras/codec/src/main/java/org/apache/directory/api/ldap/extras/extended/ads_impl/gracefulShutdown/GracefulShutdownGrammar.java
index 653b987..bf06a30 100644
--- a/ldap/extras/codec/src/main/java/org/apache/directory/api/ldap/extras/extended/ads_impl/gracefulShutdown/GracefulShutdownGrammar.java
+++ b/ldap/extras/codec/src/main/java/org/apache/directory/api/ldap/extras/extended/ads_impl/gracefulShutdown/GracefulShutdownGrammar.java
@@ -56,9 +56,6 @@ public final class GracefulShutdownGrammar extends AbstractGrammar<GracefulShutd
     /** The logger */
     static final Logger LOG = LoggerFactory.getLogger( GracefulShutdownGrammar.class );
 
-    /** Speedup for logs */
-    static final boolean IS_DEBUG = LOG.isDebugEnabled();
-
     /** The instance of grammar. GracefulShutdownGrammar is a singleton */
     private static GracefulShutdownGrammar instance = new GracefulShutdownGrammar();
 
@@ -124,7 +121,7 @@ public final class GracefulShutdownGrammar extends AbstractGrammar<GracefulShutd
                         {
                             int timeOffline = IntegerDecoder.parse( value, 0, 720 );
 
-                            if ( IS_DEBUG )
+                            if ( LOG.isDebugEnabled() )
                             {
                                 LOG.debug( "Time Offline = " + timeOffline );
                             }
@@ -166,7 +163,7 @@ public final class GracefulShutdownGrammar extends AbstractGrammar<GracefulShutd
                         {
                             int delay = IntegerDecoder.parse( value, 0, 86400 );
 
-                            if ( IS_DEBUG )
+                            if ( LOG.isDebugEnabled() )
                             {
                                 LOG.debug( "Delay = " + delay );
                             }
@@ -210,7 +207,7 @@ public final class GracefulShutdownGrammar extends AbstractGrammar<GracefulShutd
                         {
                             int delay = IntegerDecoder.parse( value, 0, 86400 );
 
-                            if ( IS_DEBUG )
+                            if ( LOG.isDebugEnabled() )
                             {
                                 LOG.debug( "Delay = " + delay );
                             }
diff --git a/ldap/extras/codec/src/main/java/org/apache/directory/api/ldap/extras/extended/ads_impl/pwdModify/PasswordModifyRequestGrammar.java b/ldap/extras/codec/src/main/java/org/apache/directory/api/ldap/extras/extended/ads_impl/pwdModify/PasswordModifyRequestGrammar.java
index aa188ff..3bae478 100644
--- a/ldap/extras/codec/src/main/java/org/apache/directory/api/ldap/extras/extended/ads_impl/pwdModify/PasswordModifyRequestGrammar.java
+++ b/ldap/extras/codec/src/main/java/org/apache/directory/api/ldap/extras/extended/ads_impl/pwdModify/PasswordModifyRequestGrammar.java
@@ -55,9 +55,6 @@ public class PasswordModifyRequestGrammar extends AbstractGrammar<PasswordModify
     /** logger */
     private static final Logger LOG = LoggerFactory.getLogger( PasswordModifyRequestGrammar.class );
 
-    /** Speedup for logs */
-    static final boolean IS_DEBUG = LOG.isDebugEnabled();
-
     /** The instance of grammar. PasswdModifyRequestGrammar is a singleton */
     private static Grammar<PasswordModifyRequestContainer> instance = new PasswordModifyRequestGrammar();
 
@@ -122,7 +119,7 @@ public class PasswordModifyRequestGrammar extends AbstractGrammar<PasswordModify
 
                         byte[] userIdentity = value.getData();
 
-                        if ( IS_DEBUG )
+                        if ( LOG.isDebugEnabled() )
                         {
                             LOG.debug( "UserIdentity = " + Strings.dumpBytes( userIdentity ) );
                         }
@@ -162,7 +159,7 @@ public class PasswordModifyRequestGrammar extends AbstractGrammar<PasswordModify
 
                         byte[] oldPassword = value.getData();
 
-                        if ( IS_DEBUG )
+                        if ( LOG.isDebugEnabled() )
                         {
                             LOG.debug( "oldPassword = " + Strings.dumpBytes( oldPassword ) );
                         }
@@ -203,7 +200,7 @@ public class PasswordModifyRequestGrammar extends AbstractGrammar<PasswordModify
 
                         byte[] newPassword = value.getData();
 
-                        if ( IS_DEBUG )
+                        if ( LOG.isDebugEnabled() )
                         {
                             LOG.debug( "newPassword = " + Strings.dumpBytes( newPassword ) );
                         }
@@ -243,7 +240,7 @@ public class PasswordModifyRequestGrammar extends AbstractGrammar<PasswordModify
 
                         byte[] oldPassword = value.getData();
 
-                        if ( IS_DEBUG )
+                        if ( LOG.isDebugEnabled() )
                         {
                             LOG.debug( "OldPassword = " + Strings.dumpBytes( oldPassword ) );
                         }
@@ -283,7 +280,7 @@ public class PasswordModifyRequestGrammar extends AbstractGrammar<PasswordModify
 
                         byte[] newPassword = value.getData();
 
-                        if ( IS_DEBUG )
+                        if ( LOG.isDebugEnabled() )
                         {
                             LOG.debug( "NewPassword = " + Strings.dumpBytes( newPassword ) );
                         }
@@ -323,7 +320,7 @@ public class PasswordModifyRequestGrammar extends AbstractGrammar<PasswordModify
 
                         byte[] newPassword = value.getData();
 
-                        if ( IS_DEBUG )
+                        if ( LOG.isDebugEnabled() )
                         {
                             LOG.debug( "NewPassword = " + Strings.dumpBytes( newPassword ) );
                         }
diff --git a/ldap/extras/codec/src/main/java/org/apache/directory/api/ldap/extras/extended/ads_impl/pwdModify/PasswordModifyResponseGrammar.java b/ldap/extras/codec/src/main/java/org/apache/directory/api/ldap/extras/extended/ads_impl/pwdModify/PasswordModifyResponseGrammar.java
index 6f81bca..befe46a 100644
--- a/ldap/extras/codec/src/main/java/org/apache/directory/api/ldap/extras/extended/ads_impl/pwdModify/PasswordModifyResponseGrammar.java
+++ b/ldap/extras/codec/src/main/java/org/apache/directory/api/ldap/extras/extended/ads_impl/pwdModify/PasswordModifyResponseGrammar.java
@@ -53,9 +53,6 @@ public class PasswordModifyResponseGrammar extends AbstractGrammar<PasswordModif
     /** logger */
     private static final Logger LOG = LoggerFactory.getLogger( PasswordModifyResponseGrammar.class );
 
-    /** Speedup for logs */
-    static final boolean IS_DEBUG = LOG.isDebugEnabled();
-
     /** The instance of grammar. PasswdModifyResponseGrammar is a singleton */
     private static Grammar<PasswordModifyResponseContainer> instance = new PasswordModifyResponseGrammar();
 
@@ -120,7 +117,7 @@ public class PasswordModifyResponseGrammar extends AbstractGrammar<PasswordModif
 
                         byte[] genPassword = value.getData();
 
-                        if ( IS_DEBUG )
+                        if ( LOG.isDebugEnabled() )
                         {
                             LOG.debug( "GenPassword = " + Strings.dumpBytes( genPassword ) );
                         }
diff --git a/ldap/extras/codec/src/main/java/org/apache/directory/api/ldap/extras/extended/ads_impl/whoAmI/WhoAmIResponseGrammar.java b/ldap/extras/codec/src/main/java/org/apache/directory/api/ldap/extras/extended/ads_impl/whoAmI/WhoAmIResponseGrammar.java
index d12951e..c5e2681 100644
--- a/ldap/extras/codec/src/main/java/org/apache/directory/api/ldap/extras/extended/ads_impl/whoAmI/WhoAmIResponseGrammar.java
+++ b/ldap/extras/codec/src/main/java/org/apache/directory/api/ldap/extras/extended/ads_impl/whoAmI/WhoAmIResponseGrammar.java
@@ -52,9 +52,6 @@ public class WhoAmIResponseGrammar extends AbstractGrammar<WhoAmIResponseContain
     /** logger */
     private static final Logger LOG = LoggerFactory.getLogger( WhoAmIResponseGrammar.class );
 
-    /** Speedup for logs */
-    static final boolean IS_DEBUG = LOG.isDebugEnabled();
-
     /** The instance of grammar. WhoAmIResponseGrammar is a singleton */
     private static Grammar<WhoAmIResponseContainer> instance = new WhoAmIResponseGrammar();
 
diff --git a/ldap/extras/codec/src/main/java/org/apache/directory/api/ldap/extras/intermediate/syncrepl_impl/SyncInfoValueGrammar.java b/ldap/extras/codec/src/main/java/org/apache/directory/api/ldap/extras/intermediate/syncrepl_impl/SyncInfoValueGrammar.java
index 2af4c9f..c3ce17e 100644
--- a/ldap/extras/codec/src/main/java/org/apache/directory/api/ldap/extras/intermediate/syncrepl_impl/SyncInfoValueGrammar.java
+++ b/ldap/extras/codec/src/main/java/org/apache/directory/api/ldap/extras/intermediate/syncrepl_impl/SyncInfoValueGrammar.java
@@ -67,9 +67,6 @@ public final class SyncInfoValueGrammar extends AbstractGrammar<SyncInfoValueCon
     /** The logger */
     static final Logger LOG = LoggerFactory.getLogger( SyncInfoValueGrammar.class );
 
-    /** Speedup for logs */
-    static final boolean IS_DEBUG = LOG.isDebugEnabled();
-
     /** The instance of grammar. SyncInfoValueGrammar is a singleton */
     private static Grammar<SyncInfoValueContainer> instance = new SyncInfoValueGrammar();
 
@@ -110,7 +107,8 @@ public final class SyncInfoValueGrammar extends AbstractGrammar<SyncInfoValueCon
 
                         byte[] newCookie = value.getData();
 
-                        if ( IS_DEBUG )
+                        if ( LOG.isDebugEnabled()
+ )
                         {
                             LOG.debug( "newcookie = {}", Strings.dumpBytes( newCookie ) );
                         }
@@ -174,7 +172,8 @@ public final class SyncInfoValueGrammar extends AbstractGrammar<SyncInfoValueCon
 
                         byte[] cookie = value.getData();
 
-                        if ( IS_DEBUG )
+                        if ( LOG.isDebugEnabled()
+ )
                         {
                             LOG.debug( "cookie = {}", Strings.dumpBytes( cookie ) );
                         }
@@ -213,7 +212,8 @@ public final class SyncInfoValueGrammar extends AbstractGrammar<SyncInfoValueCon
                         {
                             boolean refreshDone = BooleanDecoder.parse( value );
 
-                            if ( IS_DEBUG )
+                            if ( LOG.isDebugEnabled()
+ )
                             {
                                 LOG.debug( "refreshDone = {}", refreshDone );
                             }
@@ -262,7 +262,8 @@ public final class SyncInfoValueGrammar extends AbstractGrammar<SyncInfoValueCon
                         {
                             boolean refreshDone = BooleanDecoder.parse( value );
 
-                            if ( IS_DEBUG )
+                            if ( LOG.isDebugEnabled()
+ )
                             {
                                 LOG.debug( "refreshDone = {}", refreshDone );
                             }
@@ -336,7 +337,8 @@ public final class SyncInfoValueGrammar extends AbstractGrammar<SyncInfoValueCon
 
                         byte[] cookie = value.getData();
 
-                        if ( IS_DEBUG )
+                        if ( LOG.isDebugEnabled()
+ )
                         {
                             LOG.debug( "cookie = {}", Strings.dumpBytes( cookie ) );
                         }
@@ -375,7 +377,8 @@ public final class SyncInfoValueGrammar extends AbstractGrammar<SyncInfoValueCon
                         {
                             boolean refreshDone = BooleanDecoder.parse( value );
 
-                            if ( IS_DEBUG )
+                            if ( LOG.isDebugEnabled()
+ )
                             {
                                 LOG.debug( "refreshDone = {}", refreshDone );
                             }
@@ -424,7 +427,8 @@ public final class SyncInfoValueGrammar extends AbstractGrammar<SyncInfoValueCon
                         {
                             boolean refreshDone = BooleanDecoder.parse( value );
 
-                            if ( IS_DEBUG )
+                            if ( LOG.isDebugEnabled()
+ )
                             {
                                 LOG.debug( "refreshDone = {}", refreshDone );
                             }
@@ -494,7 +498,8 @@ public final class SyncInfoValueGrammar extends AbstractGrammar<SyncInfoValueCon
 
                         byte[] cookie = value.getData();
 
-                        if ( IS_DEBUG )
+                        if ( LOG.isDebugEnabled()
+ )
                         {
                             LOG.debug( "cookie = {}", Strings.dumpBytes( cookie ) );
                         }
@@ -529,7 +534,8 @@ public final class SyncInfoValueGrammar extends AbstractGrammar<SyncInfoValueCon
                         {
                             boolean refreshDeletes = BooleanDecoder.parse( value );
 
-                            if ( IS_DEBUG )
+                            if ( LOG.isDebugEnabled()
+ )
                             {
                                 LOG.debug( "refreshDeletes = {}", refreshDeletes );
                             }
@@ -572,7 +578,8 @@ public final class SyncInfoValueGrammar extends AbstractGrammar<SyncInfoValueCon
                         {
                             boolean refreshDeletes = BooleanDecoder.parse( value );
 
-                            if ( IS_DEBUG )
+                            if ( LOG.isDebugEnabled()
+ )
                             {
                                 LOG.debug( "refreshDeletes = {}", refreshDeletes );
                             }
@@ -689,7 +696,8 @@ public final class SyncInfoValueGrammar extends AbstractGrammar<SyncInfoValueCon
                             throw new DecoderException( msg );
                         }
 
-                        if ( IS_DEBUG )
+                        if ( LOG.isDebugEnabled()
+ )
                         {
                             LOG.debug( "UUID = {}", Strings.dumpBytes( uuid ) );
                         }
@@ -734,7 +742,8 @@ public final class SyncInfoValueGrammar extends AbstractGrammar<SyncInfoValueCon
                             throw new DecoderException( msg );
                         }
 
-                        if ( IS_DEBUG )
+                        if ( LOG.isDebugEnabled()
+ )
                         {
                             LOG.debug( "UUID = {}", Strings.dumpBytes( uuid ) );
                         }
diff --git a/ldap/model/src/main/java/org/apache/directory/api/ldap/model/cursor/EmptyCursor.java b/ldap/model/src/main/java/org/apache/directory/api/ldap/model/cursor/EmptyCursor.java
index 199e459..d7f925a 100755
--- a/ldap/model/src/main/java/org/apache/directory/api/ldap/model/cursor/EmptyCursor.java
+++ b/ldap/model/src/main/java/org/apache/directory/api/ldap/model/cursor/EmptyCursor.java
@@ -39,15 +39,12 @@ public class EmptyCursor<E> extends AbstractCursor<E>
     /** A dedicated log for cursors */
     private static final Logger LOG_CURSOR = LoggerFactory.getLogger( Loggers.CURSOR_LOG.getName() );
 
-    /** Speedup for logs */
-    private static final boolean IS_DEBUG = LOG_CURSOR.isDebugEnabled();
-
     /**
      * Creates a new EmptyCursor instance
      */
     public EmptyCursor()
     {
-        if ( IS_DEBUG )
+        if ( LOG_CURSOR.isDebugEnabled() )
         {
             LOG_CURSOR.debug( I18n.msg( I18n.MSG_13103_CREATING_EMPTY_CURSOR, this ) );
         }
@@ -165,7 +162,7 @@ public class EmptyCursor<E> extends AbstractCursor<E>
     @Override
     public void close() throws IOException
     {
-        if ( IS_DEBUG )
+        if ( LOG_CURSOR.isDebugEnabled() )
         {
             LOG_CURSOR.debug( I18n.msg( I18n.MSG_13100_CLOSING_EMPTY_CURSOR, this ) );
         }
@@ -180,7 +177,7 @@ public class EmptyCursor<E> extends AbstractCursor<E>
     @Override
     public void close( Exception cause ) throws IOException
     {
-        if ( IS_DEBUG )
+        if ( LOG_CURSOR.isDebugEnabled() )
         {
             LOG_CURSOR.debug( I18n.msg( I18n.MSG_13100_CLOSING_EMPTY_CURSOR, this ) );
         }
diff --git a/ldap/model/src/main/java/org/apache/directory/api/ldap/model/cursor/ListCursor.java b/ldap/model/src/main/java/org/apache/directory/api/ldap/model/cursor/ListCursor.java
index b87099b..7d5d40b 100644
--- a/ldap/model/src/main/java/org/apache/directory/api/ldap/model/cursor/ListCursor.java
+++ b/ldap/model/src/main/java/org/apache/directory/api/ldap/model/cursor/ListCursor.java
@@ -43,9 +43,6 @@ public class ListCursor<E> extends AbstractCursor<E>
     /** A dedicated log for cursors */
     private static final Logger LOG_CURSOR = LoggerFactory.getLogger( Loggers.CURSOR_LOG.getName() );
 
-    /** Speedup for logs */
-    private static final boolean IS_DEBUG = LOG_CURSOR.isDebugEnabled();
-
     /** The inner List */
     private final List<E> list;
 
@@ -99,7 +96,7 @@ public class ListCursor<E> extends AbstractCursor<E>
             throw new IllegalArgumentException( I18n.err( I18n.ERR_13107_START_INDEX_ABOVE_END_INDEX, start, end ) );
         }
 
-        if ( IS_DEBUG )
+        if ( LOG_CURSOR.isDebugEnabled() )
         {
             LOG_CURSOR.debug( I18n.msg( I18n.MSG_13104_CREATING_LIST_CURSOR, this ) );
         }
@@ -516,7 +513,7 @@ public class ListCursor<E> extends AbstractCursor<E>
     @Override
     public void close() throws IOException
     {
-        if ( IS_DEBUG )
+        if ( LOG_CURSOR.isDebugEnabled() )
         {
             LOG_CURSOR.debug( I18n.msg( I18n.MSG_13101_CLOSING_LIST_CURSOR, this ) );
         }
@@ -531,7 +528,7 @@ public class ListCursor<E> extends AbstractCursor<E>
     @Override
     public void close( Exception cause ) throws IOException
     {
-        if ( IS_DEBUG )
+        if ( LOG_CURSOR.isDebugEnabled() )
         {
             LOG_CURSOR.debug( I18n.msg( I18n.MSG_13101_CLOSING_LIST_CURSOR, this ) );
         }
diff --git a/ldap/model/src/main/java/org/apache/directory/api/ldap/model/cursor/SetCursor.java b/ldap/model/src/main/java/org/apache/directory/api/ldap/model/cursor/SetCursor.java
index 768c0ab..8087912 100644
--- a/ldap/model/src/main/java/org/apache/directory/api/ldap/model/cursor/SetCursor.java
+++ b/ldap/model/src/main/java/org/apache/directory/api/ldap/model/cursor/SetCursor.java
@@ -43,9 +43,6 @@ public class SetCursor<E> extends AbstractCursor<E>
     /** A dedicated log for cursors */
     private static final Logger LOG_CURSOR = LoggerFactory.getLogger( Loggers.CURSOR_LOG.getName() );
 
-    /** Speedup for logs */
-    private static final boolean IS_DEBUG = LOG_CURSOR.isDebugEnabled();
-
     /** The inner Set */
     private final E[] set;
 
@@ -77,7 +74,7 @@ public class SetCursor<E> extends AbstractCursor<E>
             set = Collections.EMPTY_SET;
         }
 
-        if ( IS_DEBUG )
+        if ( LOG_CURSOR.isDebugEnabled() )
         {
             LOG_CURSOR.debug( I18n.msg( I18n.MSG_13105_CREATING_SET_CURSOR, this ) );
         }
@@ -406,7 +403,7 @@ public class SetCursor<E> extends AbstractCursor<E>
     @Override
     public void close() throws IOException
     {
-        if ( IS_DEBUG )
+        if ( LOG_CURSOR.isDebugEnabled() )
         {
             LOG_CURSOR.debug( I18n.msg( I18n.MSG_13102_CLOSING_SET_CURSOR, this ) );
         }
@@ -421,7 +418,7 @@ public class SetCursor<E> extends AbstractCursor<E>
     @Override
     public void close( Exception cause ) throws IOException
     {
-        if ( IS_DEBUG )
+        if ( LOG_CURSOR.isDebugEnabled() )
         {
             LOG_CURSOR.debug( I18n.msg( I18n.MSG_13102_CLOSING_SET_CURSOR, this ) );
         }
diff --git a/ldap/model/src/main/java/org/apache/directory/api/ldap/model/cursor/SingletonCursor.java b/ldap/model/src/main/java/org/apache/directory/api/ldap/model/cursor/SingletonCursor.java
index e8ae684..eef26a9 100755
--- a/ldap/model/src/main/java/org/apache/directory/api/ldap/model/cursor/SingletonCursor.java
+++ b/ldap/model/src/main/java/org/apache/directory/api/ldap/model/cursor/SingletonCursor.java
@@ -40,9 +40,6 @@ public class SingletonCursor<E> extends AbstractCursor<E>
     /** A dedicated log for cursors */
     private static final Logger LOG_CURSOR = LoggerFactory.getLogger( Loggers.CURSOR_LOG.getName() );
 
-    /** Speedup for logs */
-    private static final boolean IS_DEBUG = LOG_CURSOR.isDebugEnabled();
-
     /** A flag to tell if the cursor is set before the first element */
     private boolean beforeFirst = true;
 
@@ -79,7 +76,7 @@ public class SingletonCursor<E> extends AbstractCursor<E>
      */
     public SingletonCursor( E singleton, Comparator<E> comparator )
     {
-        if ( IS_DEBUG )
+        if ( LOG_CURSOR.isDebugEnabled() )
         {
             LOG_CURSOR.debug( I18n.msg( I18n.MSG_13106_CREATING_SINGLE_CURSOR, this ) );
         }
@@ -339,7 +336,7 @@ public void after( E element ) throws LdapException, CursorException
     @Override
     public void close() throws IOException
     {
-        if ( IS_DEBUG )
+        if ( LOG_CURSOR.isDebugEnabled() )
         {
             LOG_CURSOR.debug( I18n.msg( I18n.MSG_13102_CLOSING_SINGLETON_CURSOR, this ) );
         }
@@ -354,7 +351,7 @@ public void after( E element ) throws LdapException, CursorException
     @Override
     public void close( Exception cause ) throws IOException
     {
-        if ( IS_DEBUG )
+        if ( LOG_CURSOR.isDebugEnabled() )
         {
             LOG_CURSOR.debug( I18n.msg( I18n.MSG_13102_CLOSING_SINGLETON_CURSOR, this ) );
         }
diff --git a/ldap/model/src/main/java/org/apache/directory/api/ldap/model/entry/DefaultAttribute.java b/ldap/model/src/main/java/org/apache/directory/api/ldap/model/entry/DefaultAttribute.java
index 3b02953..cc20e74 100644
--- a/ldap/model/src/main/java/org/apache/directory/api/ldap/model/entry/DefaultAttribute.java
+++ b/ldap/model/src/main/java/org/apache/directory/api/ldap/model/entry/DefaultAttribute.java
@@ -1060,7 +1060,10 @@ public class DefaultAttribute implements Attribute, Cloneable
                     }
                     else
                     {
-                        LOG.warn( I18n.err( I18n.ERR_13207_VALUE_ALREADY_EXISTS, val, upId ) );
+                        if ( LOG.isWarnEnabled() )
+                        {
+                            LOG.warn( I18n.err( I18n.ERR_13207_VALUE_ALREADY_EXISTS, val, upId ) );
+                        }
                     }
                 }
             }
@@ -1114,7 +1117,10 @@ public class DefaultAttribute implements Attribute, Cloneable
                     }
                     else
                     {
-                        LOG.warn( I18n.err( I18n.ERR_13207_VALUE_ALREADY_EXISTS, val, upId ) );
+                        if ( LOG.isWarnEnabled() )
+                        {
+                            LOG.warn( I18n.err( I18n.ERR_13207_VALUE_ALREADY_EXISTS, val, upId ) );
+                        }
                     }
                 }
             }
@@ -1186,14 +1192,21 @@ public class DefaultAttribute implements Attribute, Cloneable
                 }
                 else
                 {
-                    LOG.warn( I18n.err( I18n.ERR_13207_VALUE_ALREADY_EXISTS, Strings.dumpBytes( val ), upId ) );
+                    if ( LOG.isWarnEnabled() )
+                    {
+                        LOG.warn( I18n.err( I18n.ERR_13207_VALUE_ALREADY_EXISTS, Strings.dumpBytes( val ), upId ) );
+                    }
                 }
             }
         }
         else
         {
             // We can't add Binary values into a String Attribute
-            LOG.info( I18n.err( I18n.ERR_13213_VALUE_MUST_BE_A_STRING ) );
+            if ( LOG.isInfoEnabled() )
+            {
+                LOG.info( I18n.err( I18n.ERR_13213_VALUE_MUST_BE_A_STRING ) );
+            }
+            
             return 0;
         }
 
diff --git a/ldap/model/src/main/java/org/apache/directory/api/ldap/model/entry/DefaultEntry.java b/ldap/model/src/main/java/org/apache/directory/api/ldap/model/entry/DefaultEntry.java
index 1e27f54..5ea2821 100644
--- a/ldap/model/src/main/java/org/apache/directory/api/ldap/model/entry/DefaultEntry.java
+++ b/ldap/model/src/main/java/org/apache/directory/api/ldap/model/entry/DefaultEntry.java
@@ -329,7 +329,11 @@ public final class DefaultEntry implements Entry
             catch ( LdapException ne )
             {
                 // Just log a warning
-                LOG.warn( I18n.msg( I18n.MSG_13200_CANT_STORE_ATTRIBUTE, attribute.getId() ) );
+                if ( LOG.isWarnEnabled() )
+                {
+                    LOG.warn( I18n.msg( I18n.MSG_13200_CANT_STORE_ATTRIBUTE, attribute.getId() ) );
+                }
+                
                 throw ne;
             }
         }
@@ -516,7 +520,10 @@ public final class DefaultEntry implements Entry
             }
             catch ( LdapException ne )
             {
-                LOG.warn( I18n.msg( I18n.MSG_13201_DN_CANT_BE_NORMALIZED, dn ) );
+                if ( LOG.isWarnEnabled() )
+                {
+                    LOG.warn( I18n.msg( I18n.MSG_13201_DN_CANT_BE_NORMALIZED, dn ) );
+                }
                 
                 return dn;
             }
@@ -1996,8 +2003,11 @@ public final class DefaultEntry implements Entry
                 }
                 else
                 {
-                    String message = I18n.err( I18n.ERR_13218_AT_DOES_NOT_EXIST, attribute );
-                    LOG.warn( message );
+                    if ( LOG.isWarnEnabled() )
+                    {
+                        LOG.warn( I18n.err( I18n.ERR_13218_AT_DOES_NOT_EXIST, attribute ) );
+                    }
+                    
                     continue;
                 }
             }
@@ -2014,7 +2024,11 @@ public final class DefaultEntry implements Entry
                 }
                 catch ( LdapException ne )
                 {
-                    LOG.warn( I18n.msg( I18n.MSG_13203_MISSING_ATTRIBUTE_IN_ENTRY, attribute ) );
+                    if ( LOG.isWarnEnabled() )
+                    {
+                        LOG.warn( I18n.msg( I18n.MSG_13203_MISSING_ATTRIBUTE_IN_ENTRY, attribute ) );
+                    }
+                    
                     continue;
                 }
 
@@ -2049,8 +2063,11 @@ public final class DefaultEntry implements Entry
     {
         if ( Strings.isEmpty( upId ) )
         {
-            String message = I18n.err( I18n.ERR_13204_NULL_ATTRIBUTE_ID );
-            LOG.info( message );
+            if ( LOG.isInfoEnabled() )
+            {
+                LOG.info( I18n.err( I18n.ERR_13204_NULL_ATTRIBUTE_ID ) );
+            }
+            
             return false;
         }
 
@@ -2130,8 +2147,11 @@ public final class DefaultEntry implements Entry
     {
         if ( Strings.isEmpty( upId ) )
         {
-            String message = I18n.err( I18n.ERR_13204_NULL_ATTRIBUTE_ID );
-            LOG.info( message );
+            if ( LOG.isInfoEnabled() )
+            {
+                LOG.info( I18n.err( I18n.ERR_13204_NULL_ATTRIBUTE_ID ) );
+            }
+            
             return false;
         }
 
@@ -2210,8 +2230,11 @@ public final class DefaultEntry implements Entry
     {
         if ( Strings.isEmpty( upId ) )
         {
-            String message = I18n.err( I18n.ERR_13204_NULL_ATTRIBUTE_ID );
-            LOG.info( message );
+            if ( LOG.isInfoEnabled() )
+            {
+                LOG.info( I18n.err( I18n.ERR_13204_NULL_ATTRIBUTE_ID ) );
+            }
+            
             return false;
         }
 
diff --git a/ldap/model/src/main/java/org/apache/directory/api/ldap/model/entry/Value.java b/ldap/model/src/main/java/org/apache/directory/api/ldap/model/entry/Value.java
index 7bb5bb4..0e731a2 100644
--- a/ldap/model/src/main/java/org/apache/directory/api/ldap/model/entry/Value.java
+++ b/ldap/model/src/main/java/org/apache/directory/api/ldap/model/entry/Value.java
@@ -204,7 +204,11 @@ public class Value implements Cloneable, Externalizable, Comparable<Value>
             if ( attributeType.getSyntax() == null )
             {
                 // Some broken LDAP servers do not have proper syntax definitions, default to HR
-                LOG.info( I18n.err( I18n.ERR_13225_NO_SYNTAX ) );
+                if ( LOG.isInfoEnabled() )
+                {
+                    LOG.info( I18n.err( I18n.ERR_13225_NO_SYNTAX ) );
+                }
+                
                 isHR = true;
                 //throw new IllegalArgumentException( I18n.err( I18n.ERR_13225_NO_SYNTAX ) );
             }
@@ -215,7 +219,10 @@ public class Value implements Cloneable, Externalizable, Comparable<Value>
         }
         else
         {
-            LOG.warn( I18n.msg( I18n.MSG_13202_AT_IS_NULL ) );
+            if ( LOG.isWarnEnabled() )
+            {
+                LOG.warn( I18n.msg( I18n.MSG_13202_AT_IS_NULL ) );
+            }
         }
         
         this.attributeType = attributeType;
diff --git a/ldap/model/src/main/java/org/apache/directory/api/ldap/model/ldif/LdifAttributesReader.java b/ldap/model/src/main/java/org/apache/directory/api/ldap/model/ldif/LdifAttributesReader.java
index fd7927c..0f493fe 100644
--- a/ldap/model/src/main/java/org/apache/directory/api/ldap/model/ldif/LdifAttributesReader.java
+++ b/ldap/model/src/main/java/org/apache/directory/api/ldap/model/ldif/LdifAttributesReader.java
@@ -322,7 +322,10 @@ public class LdifAttributesReader extends LdifReader
     {
         if ( ( lines == null ) || lines.isEmpty() )
         {
-            LOG.debug( I18n.msg( I18n.MSG_13408_END_OF_LDIF ) );
+            if ( LOG.isDebugEnabled() )
+            {
+                LOG.debug( I18n.msg( I18n.MSG_13408_END_OF_LDIF ) );
+            }
             
             return null;
         }
@@ -362,7 +365,10 @@ public class LdifAttributesReader extends LdifReader
             }
         }
 
-        LOG.debug( I18n.msg( I18n.MSG_13405_READ_ATTR, entry ) );
+        if ( LOG.isDebugEnabled() )
+        {
+            LOG.debug( I18n.msg( I18n.MSG_13405_READ_ATTR, entry ) );
+        }
 
         return entry;
     }
@@ -387,7 +393,10 @@ public class LdifAttributesReader extends LdifReader
     {
         if ( ( lines == null ) || lines.isEmpty() )
         {
-            LOG.debug( I18n.msg( I18n.MSG_13408_END_OF_LDIF ) );
+            if ( LOG.isDebugEnabled() )
+            {
+                LOG.debug( I18n.msg( I18n.MSG_13408_END_OF_LDIF ) );
+            }
 
             return null;
         }
@@ -427,7 +436,10 @@ public class LdifAttributesReader extends LdifReader
             }
         }
 
-        LOG.debug( I18n.msg( I18n.MSG_13405_READ_ATTR, attributes ) );
+        if ( LOG.isDebugEnabled() )
+        {
+            LOG.debug( I18n.msg( I18n.MSG_13405_READ_ATTR, attributes ) );
+        }
 
         return attributes;
     }
@@ -445,7 +457,10 @@ public class LdifAttributesReader extends LdifReader
         lines = new ArrayList<String>();
         position = 0;
 
-        LOG.debug( I18n.msg( I18n.MSG_13407_STARTS_PARSING_LDIF ) );
+        if ( LOG.isDebugEnabled() )
+        {
+            LOG.debug( I18n.msg( I18n.MSG_13407_STARTS_PARSING_LDIF ) );
+        }
 
         if ( Strings.isEmpty( ldif ) )
         {
@@ -506,7 +521,10 @@ public class LdifAttributesReader extends LdifReader
         lines = new ArrayList<String>();
         position = 0;
 
-        LOG.debug( I18n.msg( I18n.MSG_13407_STARTS_PARSING_LDIF ) );
+        if ( LOG.isDebugEnabled() )
+        {
+            LOG.debug( I18n.msg( I18n.MSG_13407_STARTS_PARSING_LDIF ) );
+        }
 
         if ( Strings.isEmpty( ldif ) )
         {
@@ -568,7 +586,10 @@ public class LdifAttributesReader extends LdifReader
         lines = new ArrayList<String>();
         position = 0;
 
-        LOG.debug( I18n.msg( I18n.MSG_13407_STARTS_PARSING_LDIF ) );
+        if ( LOG.isDebugEnabled() )
+        {
+            LOG.debug( I18n.msg( I18n.MSG_13407_STARTS_PARSING_LDIF ) );
+        }
 
         if ( Strings.isEmpty( ldif ) )
         {
diff --git a/ldap/model/src/main/java/org/apache/directory/api/ldap/model/ldif/LdifReader.java b/ldap/model/src/main/java/org/apache/directory/api/ldap/model/ldif/LdifReader.java
index 828c840..9291347 100644
--- a/ldap/model/src/main/java/org/apache/directory/api/ldap/model/ldif/LdifReader.java
+++ b/ldap/model/src/main/java/org/apache/directory/api/ldap/model/ldif/LdifReader.java
@@ -1410,7 +1410,10 @@ public class LdifReader implements Iterable<LdifEntry>, Closeable
     {
         if ( ( lines == null ) || lines.isEmpty() )
         {
-            LOG.debug( I18n.msg( I18n.MSG_13408_END_OF_LDIF ) );
+            if ( LOG.isDebugEnabled() )
+            {
+                LOG.debug( I18n.msg( I18n.MSG_13408_END_OF_LDIF ) );
+            }
 
             return null;
         }
@@ -1569,12 +1572,19 @@ public class LdifReader implements Iterable<LdifEntry>, Closeable
 
         if ( type == LDIF_ENTRY )
         {
-            LOG.debug( I18n.msg( I18n.MSG_13406_READ_ENTRY, entry ) );
+            if ( LOG.isDebugEnabled() )
+            {
+                LOG.debug( I18n.msg( I18n.MSG_13406_READ_ENTRY, entry ) );
+            }
         }
         else if ( type == CHANGE )
         {
             entry.setChangeType( operation );
-            LOG.debug( I18n.msg( I18n.MSG_13404_READ_MODIF, entry ) );
+
+            if ( LOG.isDebugEnabled() )
+            {
+                LOG.debug( I18n.msg( I18n.MSG_13404_READ_MODIF, entry ) );
+            }
         }
         else
         {
@@ -1601,7 +1611,11 @@ public class LdifReader implements Iterable<LdifEntry>, Closeable
 
         if ( lines.isEmpty() )
         {
-            LOG.warn( I18n.msg( I18n.MSG_13414_LDIF_FILE_EMPTY ) );
+            if ( LOG.isWarnEnabled() )
+            {
+                LOG.warn( I18n.msg( I18n.MSG_13414_LDIF_FILE_EMPTY ) );
+            }
+            
             return ver;
         }
 
@@ -1637,7 +1651,10 @@ public class LdifReader implements Iterable<LdifEntry>, Closeable
                 throw new LdapLdifException( I18n.err( I18n.ERR_13462_LDIF_PARSING_ERROR ), nfe );
             }
 
-            LOG.debug( I18n.msg( I18n.MSG_13400_LDIF_VERSION, versionNumber ) );
+            if ( LOG.isDebugEnabled() )
+            {
+                LOG.debug( I18n.msg( I18n.MSG_13400_LDIF_VERSION, versionNumber ) );
+            }
 
             // We have found the version, just discard the line from the list
             lines.remove( 0 );
@@ -1655,7 +1672,10 @@ public class LdifReader implements Iterable<LdifEntry>, Closeable
         }
         else
         {
-            LOG.info( I18n.msg( I18n.MSG_13413_NO_VERSION_ASSUMING_1 ) );
+            if ( LOG.isInfoEnabled() )
+            {
+                LOG.info( I18n.msg( I18n.MSG_13413_NO_VERSION_ASSUMING_1 ) );
+            }
         }
 
         return ver;
@@ -1846,7 +1866,10 @@ public class LdifReader implements Iterable<LdifEntry>, Closeable
      */
     public List<LdifEntry> parseLdif( String ldif ) throws LdapLdifException
     {
-        LOG.debug( I18n.msg( I18n.MSG_13407_STARTS_PARSING_LDIF ) );
+        if ( LOG.isDebugEnabled() )
+        {
+            LOG.debug( I18n.msg( I18n.MSG_13407_STARTS_PARSING_LDIF ) );
+        }
 
         if ( Strings.isEmpty( ldif ) )
         {
@@ -1892,7 +1915,10 @@ public class LdifReader implements Iterable<LdifEntry>, Closeable
     {
         try
         {
-            LOG.debug( I18n.msg( I18n.MSG_13411_NEXT_CALLED ) );
+            if ( LOG.isDebugEnabled() )
+            {
+                LOG.debug( I18n.msg( I18n.MSG_13411_NEXT_CALLED ) );
+            }
 
             LdifEntry entry = prefetched;
             readLines();
@@ -1911,7 +1937,10 @@ public class LdifReader implements Iterable<LdifEntry>, Closeable
                 throw new NoSuchElementException( le.getMessage() );
             }
 
-            LOG.debug( I18n.msg( I18n.MSG_13412_NEXT_RETURNING_LDIF, entry ) );
+            if ( LOG.isDebugEnabled() )
+            {
+                LOG.debug( I18n.msg( I18n.MSG_13412_NEXT_RETURNING_LDIF, entry ) );
+            }
 
             return entry;
         }
@@ -1964,13 +1993,16 @@ public class LdifReader implements Iterable<LdifEntry>, Closeable
      */
     public boolean hasNext()
     {
-        if ( prefetched != null )
+        if ( LOG.isDebugEnabled() )
         {
-            LOG.debug( I18n.msg( I18n.MSG_13410_HAS_NEXT_TRUE ) );
-        }
-        else
-        {
-            LOG.debug( I18n.msg( I18n.MSG_13409_HAS_NEXT_FALSE ) );
+            if ( prefetched != null )
+            {
+                LOG.debug( I18n.msg( I18n.MSG_13410_HAS_NEXT_TRUE ) );
+            }
+            else
+            {
+                LOG.debug( I18n.msg( I18n.MSG_13409_HAS_NEXT_FALSE ) );
+            }
         }
 
         return hasNextInternal();
diff --git a/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/SearchParams.java b/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/SearchParams.java
index bc44c07..c882cdb 100644
--- a/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/SearchParams.java
+++ b/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/SearchParams.java
@@ -214,7 +214,11 @@ public class SearchParams
             }
             catch ( LdapException ne )
             {
-                LOG.warn( I18n.msg( I18n.MSG_13500_ATTRIBUTE_NOT_IN_SCHEMA, returnAttribute ) );
+                if ( LOG.isWarnEnabled() )
+                {
+                    LOG.warn( I18n.msg( I18n.MSG_13500_ATTRIBUTE_NOT_IN_SCHEMA, returnAttribute ) );
+                }
+                
                 // Unknown attributes should be silently ignored, as RFC 2251 states
             }
         }
diff --git a/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/comparators/DeepTrimComparator.java b/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/comparators/DeepTrimComparator.java
index a19a893..7a21fc6 100644
--- a/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/comparators/DeepTrimComparator.java
+++ b/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/comparators/DeepTrimComparator.java
@@ -67,7 +67,11 @@ public class DeepTrimComparator extends LdapComparator<String>
         }
         catch ( LdapException e )
         {
-            LOG.warn( I18n.msg( I18n.MSG_13700_FAILED_TO_NORMALIZE, o1 ), e );
+            if ( LOG.isWarnEnabled() )
+            {
+                LOG.warn( I18n.msg( I18n.MSG_13700_FAILED_TO_NORMALIZE, o1 ), e );
+            }
+            
             n1 = o1;
         }
 
@@ -77,7 +81,11 @@ public class DeepTrimComparator extends LdapComparator<String>
         }
         catch ( LdapException e )
         {
-            LOG.warn( I18n.msg( I18n.MSG_13700_FAILED_TO_NORMALIZE, o2 ), e );
+            if ( LOG.isWarnEnabled() )
+            {
+                LOG.warn( I18n.msg( I18n.MSG_13700_FAILED_TO_NORMALIZE, o2 ), e );
+            }
+            
             n2 = o2;
         }
 
diff --git a/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/comparators/DeepTrimToLowerComparator.java b/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/comparators/DeepTrimToLowerComparator.java
index e6f64aa..9eb6f3d 100644
--- a/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/comparators/DeepTrimToLowerComparator.java
+++ b/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/comparators/DeepTrimToLowerComparator.java
@@ -67,7 +67,11 @@ public class DeepTrimToLowerComparator extends LdapComparator<String>
         }
         catch ( LdapException e )
         {
-            LOG.warn( I18n.msg( I18n.MSG_13700_FAILED_TO_NORMALIZE, value ), e );
+            if ( LOG.isWarnEnabled() )
+            {
+                LOG.warn( I18n.msg( I18n.MSG_13700_FAILED_TO_NORMALIZE, value ), e );
+            }
+            
             normalizedValue = value;
         }
 
diff --git a/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/comparators/NormalizingComparator.java b/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/comparators/NormalizingComparator.java
index 6d6631d..d920e74 100644
--- a/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/comparators/NormalizingComparator.java
+++ b/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/comparators/NormalizingComparator.java
@@ -93,7 +93,11 @@ public class NormalizingComparator extends LdapComparator<String>
         }
         catch ( LdapException e )
         {
-            LOG.warn( I18n.msg( I18n.MSG_13700_FAILED_TO_NORMALIZE, o1 ), e );
+            if ( LOG.isWarnEnabled() )
+            {
+                LOG.warn( I18n.msg( I18n.MSG_13700_FAILED_TO_NORMALIZE, o1 ), e );
+            }
+            
             n1 = o1;
         }
 
@@ -103,7 +107,11 @@ public class NormalizingComparator extends LdapComparator<String>
         }
         catch ( LdapException e )
         {
-            LOG.warn( I18n.msg( I18n.MSG_13700_FAILED_TO_NORMALIZE, o2 ), e );
+            if ( LOG.isWarnEnabled() )
+            {
+                LOG.warn( I18n.msg( I18n.MSG_13700_FAILED_TO_NORMALIZE, o2 ), e );
+            }
+            
             n2 = o2;
         }
 
diff --git a/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/comparators/UuidComparator.java b/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/comparators/UuidComparator.java
index 782bf63..5b88d36 100644
--- a/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/comparators/UuidComparator.java
+++ b/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/comparators/UuidComparator.java
@@ -39,8 +39,7 @@ public class UuidComparator extends SerializableComparator<String>
 
     /** A logger for this class */
     private static final Logger LOG = LoggerFactory.getLogger( UuidComparator.class );
-    private static final boolean IS_DEBUG = LOG.isDebugEnabled();
-
+    
     /** A static instance of the UuidComparator */
     public static final UuidComparator INSTANCE = new UuidComparator( "1.3.6.1.1.16.4" );
 
@@ -63,7 +62,7 @@ public class UuidComparator extends SerializableComparator<String>
     @Override
     public int compare( String uuid1, String uuid2 )
     {
-        if ( IS_DEBUG )
+        if ( LOG.isDebugEnabled() )
         {
             LOG.debug( I18n.msg( I18n.MSG_13751_COMPARING_UUID, uuid1, uuid2 ) );
         }
@@ -90,7 +89,7 @@ public class UuidComparator extends SerializableComparator<String>
      */
     public int compare( UUID uuid1, UUID uuid2 )
     {
-        if ( IS_DEBUG )
+        if ( LOG.isDebugEnabled() )
         {
             LOG.debug( I18n.msg( I18n.MSG_13751_COMPARING_UUID, uuid1, uuid2 ) );
         }
diff --git a/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/parsers/AbstractSchemaParser.java b/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/parsers/AbstractSchemaParser.java
index 83e8bc7..7764652 100644
--- a/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/parsers/AbstractSchemaParser.java
+++ b/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/parsers/AbstractSchemaParser.java
@@ -151,7 +151,10 @@ public abstract class AbstractSchemaParser<T extends SchemaObject>
      */
     public synchronized T parse( String schemaDescription ) throws ParseException
     {
-        LOG.debug( I18n.msg( I18n.MSG_13718_PARSING_A, schemaObjectType.getClass().getSimpleName(), schemaDescription ) );
+        if ( LOG.isDebugEnabled() )
+        {
+            LOG.debug( I18n.msg( I18n.MSG_13718_PARSING_A, schemaObjectType.getClass().getSimpleName(), schemaDescription ) );
+        }
 
         if ( schemaDescription == null )
         {
diff --git a/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/registries/DefaultAttributeTypeRegistry.java b/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/registries/DefaultAttributeTypeRegistry.java
index af5d701..303712e 100644
--- a/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/registries/DefaultAttributeTypeRegistry.java
+++ b/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/registries/DefaultAttributeTypeRegistry.java
@@ -250,7 +250,11 @@ public class DefaultAttributeTypeRegistry extends DefaultSchemaObjectRegistry<At
 
         if ( equality == null )
         {
-            LOG.debug( I18n.msg( I18n.MSG_13703_AT_WITHOUT_EQ_MR, attributeType.getName() ) );
+            if ( LOG.isDebugEnabled() )
+            {
+                LOG.debug( I18n.msg( I18n.MSG_13703_AT_WITHOUT_EQ_MR, attributeType.getName() ) );
+            }
+            
             oidNormalizer = new OidNormalizer( oid, new NoOpNormalizer( attributeType.getOid() ) );
         }
         else
diff --git a/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/registries/DefaultComparatorRegistry.java b/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/registries/DefaultComparatorRegistry.java
index 3a52918..af2bb27 100644
--- a/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/registries/DefaultComparatorRegistry.java
+++ b/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/registries/DefaultComparatorRegistry.java
@@ -42,10 +42,6 @@ public class DefaultComparatorRegistry extends DefaultSchemaObjectRegistry<LdapC
     /** static class logger */
     private static final Logger LOG = LoggerFactory.getLogger( DefaultComparatorRegistry.class );
 
-    /** A speedup for debug */
-    private static final boolean DEBUG = LOG.isDebugEnabled();
-
-
     /**
      * Creates a new default ComparatorRegistry instance.
      */
@@ -75,7 +71,7 @@ public class DefaultComparatorRegistry extends DefaultSchemaObjectRegistry<LdapC
                 String oid = comparator.getOid();
                 SchemaObject removed = unregister( oid );
 
-                if ( DEBUG )
+                if ( LOG.isDebugEnabled() )
                 {
                     LOG.debug( I18n.msg( I18n.MSG_13702_REMOVED_FROM_REGISTRY, removed, oid ) );
                 }
diff --git a/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/registries/DefaultDitStructureRuleRegistry.java b/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/registries/DefaultDitStructureRuleRegistry.java
index f4886ce..fffda0a 100644
--- a/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/registries/DefaultDitStructureRuleRegistry.java
+++ b/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/registries/DefaultDitStructureRuleRegistry.java
@@ -44,9 +44,6 @@ public class DefaultDitStructureRuleRegistry extends DefaultSchemaObjectRegistry
     /** static class logger */
     private static final Logger LOG = LoggerFactory.getLogger( DefaultDitStructureRuleRegistry.class );
 
-    /** A speedup for debug */
-    private static final boolean DEBUG = LOG.isDebugEnabled();
-
     /** a map of DitStructureRule looked up by RuleId */
     protected Map<Integer, DitStructureRule> byRuleId;
 
@@ -105,7 +102,12 @@ public class DefaultDitStructureRuleRegistry extends DefaultSchemaObjectRegistry
         }
 
         String msg = I18n.err( I18n.ERR_13729_RULE_ID_NOT_FOUND, ruleId );
-        LOG.warn( msg );
+
+        if ( LOG.isWarnEnabled() )
+        {
+            LOG.warn( msg );
+        }
+        
         throw new LdapException( msg );
     }
 
@@ -121,7 +123,12 @@ public class DefaultDitStructureRuleRegistry extends DefaultSchemaObjectRegistry
         if ( byRuleId.containsKey( ruleId ) )
         {
             String msg = I18n.err( I18n.ERR_13730_DIT_STRUCTURE_RULE_ALREADY_REGISTRED, ruleId );
-            LOG.warn( msg );
+            
+            if ( LOG.isWarnEnabled() )
+            {
+                LOG.warn( msg );
+            }
+            
             throw new LdapException( msg );
         }
 
@@ -145,11 +152,16 @@ public class DefaultDitStructureRuleRegistry extends DefaultSchemaObjectRegistry
         if ( ditStructureRule == null )
         {
             String msg = I18n.err( I18n.ERR_13731_DIT_STRUCTURE_RULE_DOES_NOT_EXIST, ruleId );
-            LOG.debug( msg );
+            
+            if ( LOG.isDebugEnabled() )
+            {
+                LOG.debug( msg );
+            }
+            
             throw new LdapException( msg );
         }
 
-        if ( DEBUG )
+        if ( LOG.isDebugEnabled() )
         {
             LOG.debug( I18n.msg( I18n.MSG_13724_FOUND_WITH_RULE_ID, ditStructureRule, ruleId ) );
         }
@@ -166,7 +178,7 @@ public class DefaultDitStructureRuleRegistry extends DefaultSchemaObjectRegistry
     {
         DitStructureRule ditStructureRule = byRuleId.remove( ruleId );
 
-        if ( DEBUG )
+        if ( LOG.isDebugEnabled() )
         {
             LOG.debug( I18n.msg( I18n.MSG_13721_REMOVED_WITH_RULE_ID, ditStructureRule, ruleId ) );
         }
@@ -193,7 +205,7 @@ public class DefaultDitStructureRuleRegistry extends DefaultSchemaObjectRegistry
                 int ruleId = ditStructureRule.getRuleId();
                 SchemaObject removed = byRuleId.remove( ruleId );
 
-                if ( DEBUG )
+                if ( LOG.isDebugEnabled() )
                 {
                     LOG.debug( I18n.msg( I18n.MSG_13721_REMOVED_WITH_RULE_ID, removed, ruleId ) );
                 }
@@ -216,7 +228,7 @@ public class DefaultDitStructureRuleRegistry extends DefaultSchemaObjectRegistry
             {
                 ditStructureRule.setSchemaName( newSchemaName );
 
-                if ( DEBUG )
+                if ( LOG.isDebugEnabled() )
                 {
                     LOG.debug( I18n.msg( I18n.MSG_13722_RENAMED_SCHEMA_NAME_TO, ditStructureRule, newSchemaName ) );
                 }
diff --git a/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/registries/DefaultNormalizerRegistry.java b/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/registries/DefaultNormalizerRegistry.java
index e7de88d..bdedc72 100644
--- a/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/registries/DefaultNormalizerRegistry.java
+++ b/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/registries/DefaultNormalizerRegistry.java
@@ -42,9 +42,6 @@ public class DefaultNormalizerRegistry extends DefaultSchemaObjectRegistry<Norma
     /** static class logger */
     private static final Logger LOG = LoggerFactory.getLogger( DefaultNormalizerRegistry.class );
 
-    /** A speedup for debug */
-    private static final boolean DEBUG = LOG.isDebugEnabled();
-
 
     /**
      * Creates a new default NormalizerRegistry instance.
@@ -75,7 +72,7 @@ public class DefaultNormalizerRegistry extends DefaultSchemaObjectRegistry<Norma
                 String oid = normalizer.getOid();
                 SchemaObject removed = unregister( oid );
 
-                if ( DEBUG )
+                if ( LOG.isDebugEnabled() )
                 {
                     LOG.debug( I18n.msg( I18n.MSG_13702_REMOVED_FROM_REGISTRY, removed, oid ) );
                 }
diff --git a/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/registries/DefaultSchemaObjectRegistry.java b/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/registries/DefaultSchemaObjectRegistry.java
index 320bfce..4c28cba 100644
--- a/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/registries/DefaultSchemaObjectRegistry.java
+++ b/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/registries/DefaultSchemaObjectRegistry.java
@@ -50,9 +50,6 @@ public abstract class DefaultSchemaObjectRegistry<T extends SchemaObject> implem
     /** static class logger */
     private static final Logger LOG = LoggerFactory.getLogger( DefaultSchemaObjectRegistry.class );
 
-    /** A speedup for debug */
-    private static final boolean DEBUG = LOG.isDebugEnabled();
-
     /** a map of SchemaObject looked up by name */
     protected Map<String, T> byName;
 
@@ -149,7 +146,12 @@ public abstract class DefaultSchemaObjectRegistry<T extends SchemaObject> implem
         if ( !Oid.isOid( oid ) )
         {
             String msg = I18n.err( I18n.ERR_13733_ARG_NOT_NUMERIC_OID );
-            LOG.warn( msg );
+            
+            if ( LOG.isWarnEnabled() )
+            {
+                LOG.warn( msg );
+            }
+            
             throw new LdapException( msg );
         }
 
@@ -161,7 +163,12 @@ public abstract class DefaultSchemaObjectRegistry<T extends SchemaObject> implem
         }
 
         String msg = I18n.err( I18n.ERR_13734_OID_NOT_FOUND, oid );
-        LOG.warn( msg );
+        
+        if ( LOG.isWarnEnabled() )
+        {
+            LOG.warn( msg );
+        }
+        
         throw new LdapException( msg );
     }
 
@@ -180,7 +187,7 @@ public abstract class DefaultSchemaObjectRegistry<T extends SchemaObject> implem
             {
                 schemaObject.setSchemaName( newSchemaName );
 
-                if ( DEBUG )
+                if ( LOG.isDebugEnabled() )
                 {
                     LOG.debug( I18n.msg( I18n.MSG_13722_RENAMED_SCHEMA_NAME_TO, schemaObject, newSchemaName ) );
                 }
@@ -230,12 +237,17 @@ public abstract class DefaultSchemaObjectRegistry<T extends SchemaObject> implem
             if ( schemaObject == null )
             {
                 String msg = I18n.err( I18n.ERR_13735_ELEMENT_FOR_OID_DOES_NOT_EXIST, schemaObjectType.name(), oid );
-                LOG.debug( msg );
+
+                if ( LOG.isDebugEnabled() )
+                {
+                    LOG.debug( msg );
+                }
+                
                 throw new LdapException( msg );
             }
         }
 
-        if ( DEBUG )
+        if ( LOG.isDebugEnabled() )
         {
             LOG.debug( I18n.msg( I18n.MSG_13723_FOUND_WITH_OID, schemaObject, oid ) );
         }
@@ -255,7 +267,12 @@ public abstract class DefaultSchemaObjectRegistry<T extends SchemaObject> implem
         if ( byName.containsKey( oid ) )
         {
             String msg = I18n.err( I18n.ERR_13736_ELEMENT_FOR_OID_ALREADY_REGISTERED, schemaObjectType.name(), oid );
-            LOG.warn( msg );
+            
+            if ( LOG.isWarnEnabled() )
+            {
+                LOG.warn( msg );
+            }
+            
             LdapSchemaException ldapSchemaException = new LdapSchemaException( 
                 LdapSchemaExceptionCodes.OID_ALREADY_REGISTERED, msg );
             ldapSchemaException.setSourceObject( schemaObject );
@@ -275,7 +292,12 @@ public abstract class DefaultSchemaObjectRegistry<T extends SchemaObject> implem
             if ( byName.containsKey( lowerName ) )
             {
                 String msg = I18n.err( I18n.ERR_13737_ELEMENT_WITH_NAME_ALREADY_REGISTERED, schemaObjectType.name(), name );
-                LOG.warn( msg );
+                
+                if ( LOG.isWarnEnabled() )
+                {
+                    LOG.warn( msg );
+                }
+                
                 LdapSchemaException ldapSchemaException = new LdapSchemaException(
                     LdapSchemaExceptionCodes.NAME_ALREADY_REGISTERED, msg );
                 ldapSchemaException.setSourceObject( schemaObject );
@@ -320,7 +342,7 @@ public abstract class DefaultSchemaObjectRegistry<T extends SchemaObject> implem
         // And remove the SchemaObject from the oidRegistry
         oidRegistry.unregister( numericOid );
 
-        if ( DEBUG )
+        if ( LOG.isDebugEnabled() )
         {
             LOG.debug( I18n.msg( I18n.MSG_13702_REMOVED_FROM_REGISTRY, schemaObject, numericOid ) );
         }
@@ -340,7 +362,12 @@ public abstract class DefaultSchemaObjectRegistry<T extends SchemaObject> implem
         if ( !byName.containsKey( oid ) )
         {
             String msg = I18n.err( I18n.ERR_13739_ELEMENT_WITH_OID_NOT_REGISTERED, schemaObjectType.name(), oid );
-            LOG.warn( msg );
+            
+            if ( LOG.isWarnEnabled() )
+            {
+                LOG.warn( msg );
+            }
+            
             throw new LdapException( msg );
         }
 
@@ -383,7 +410,7 @@ public abstract class DefaultSchemaObjectRegistry<T extends SchemaObject> implem
                 String oid = schemaObject.getOid();
                 SchemaObject removed = unregister( oid );
 
-                if ( DEBUG )
+                if ( LOG.isDebugEnabled() )
                 {
                     LOG.debug( I18n.msg( I18n.MSG_13702_REMOVED_FROM_REGISTRY, removed, oid ) );
                 }
diff --git a/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/registries/DefaultSyntaxCheckerRegistry.java b/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/registries/DefaultSyntaxCheckerRegistry.java
index 242735f..9319785 100644
--- a/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/registries/DefaultSyntaxCheckerRegistry.java
+++ b/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/registries/DefaultSyntaxCheckerRegistry.java
@@ -42,9 +42,6 @@ public class DefaultSyntaxCheckerRegistry extends DefaultSchemaObjectRegistry<Sy
     /** static class logger */
     private static final Logger LOG = LoggerFactory.getLogger( DefaultSyntaxCheckerRegistry.class );
 
-    /** A speedup for debug */
-    private static final boolean DEBUG = LOG.isDebugEnabled();
-
 
     /**
      * Creates a new default SyntaxCheckerRegistry instance.
@@ -75,7 +72,7 @@ public class DefaultSyntaxCheckerRegistry extends DefaultSchemaObjectRegistry<Sy
                 String oid = syntaxChecker.getOid();
                 SchemaObject removed = unregister( oid );
 
-                if ( DEBUG )
+                if ( LOG.isDebugEnabled() )
                 {
                     LOG.debug( I18n.msg( I18n.MSG_13702_REMOVED_FROM_REGISTRY, removed, oid ) );
                 }
diff --git a/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/registries/OidRegistry.java b/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/registries/OidRegistry.java
index 11044d4..ebd0e11 100644
--- a/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/registries/OidRegistry.java
+++ b/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/registries/OidRegistry.java
@@ -48,9 +48,6 @@ public class OidRegistry<T extends SchemaObject> implements Iterable<T>
     /** static class logger */
     private static final Logger LOG = LoggerFactory.getLogger( OidRegistry.class );
 
-    /** Speedup for DEBUG mode */
-    private static final boolean IS_DEBUG = LOG.isDebugEnabled();
-
     /** Maps OID to a type of SchemaObject */
     private Map<String, T> byOid = new HashMap<>();
     
@@ -144,7 +141,7 @@ public class OidRegistry<T extends SchemaObject> implements Iterable<T>
 
         List<String> names = schemaObject.getNames();
 
-        if ( IS_DEBUG )
+        if ( LOG.isDebugEnabled() )
         {
             LOG.debug( I18n.msg( I18n.MSG_13756_LOOKED_UP_NAME, ArrayUtils.toString( names ), oid ) );
         }
@@ -230,7 +227,11 @@ public class OidRegistry<T extends SchemaObject> implements Iterable<T>
         {
             String message = I18n.err( I18n.ERR_13743_CANNOT_REGISTER_NULL_SCHEMA_OBJECT );
 
-            LOG.debug( message );
+            if ( LOG.isDebugEnabled() )
+            {
+                LOG.debug( message );
+            }
+            
             throw new LdapException( message );
         }
 
@@ -242,7 +243,11 @@ public class OidRegistry<T extends SchemaObject> implements Iterable<T>
             {
                 String message = I18n.err( I18n.ERR_13744_SCHEMA_OBJECT_HAS_NO_VALID_OID );
 
-                LOG.debug( message );
+                if ( LOG.isDebugEnabled() )
+                {
+                    LOG.debug( message );
+                }
+                
                 throw new LdapException( message );
             }
         }
@@ -259,15 +264,18 @@ public class OidRegistry<T extends SchemaObject> implements Iterable<T>
          */
         if ( byOid.containsKey( oid ) )
         {
-            String message = I18n.err( I18n.ERR_13745_SCHEMA_OBJECT_WITH_OID_ALREADY_EXIST, oid );
-            LOG.info( message );
+            if ( LOG.isInfoEnabled() )
+            {
+                LOG.info( I18n.err( I18n.ERR_13745_SCHEMA_OBJECT_WITH_OID_ALREADY_EXIST, oid ) );
+            }
+
             return;
         }
         else
         {
             byOid.put( oid, schemaObject );
 
-            if ( IS_DEBUG )
+            if ( LOG.isDebugEnabled() )
             {
                 LOG.debug( I18n.msg( I18n.MSG_13742_REGISTERED_SCHEMA_OBJECT, schemaObject, oid ) );
             }
@@ -299,7 +307,7 @@ public class OidRegistry<T extends SchemaObject> implements Iterable<T>
         // Removes the <OID, names> from the byOID map
         SchemaObject removed = byOid.remove( oid );
 
-        if ( IS_DEBUG )
+        if ( LOG.isDebugEnabled() )
         {
             LOG.debug( I18n.msg( I18n.MSG_13736_UNREGISTERED_SCHEMA_OBJECT, removed, oid ) );
         }
diff --git a/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/registries/Registries.java b/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/registries/Registries.java
index da873a4..19d1de1 100644
--- a/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/registries/Registries.java
+++ b/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/registries/Registries.java
@@ -712,7 +712,11 @@ public class Registries implements SchemaLoaderListener, Cloneable
 
             Throwable error = new LdapProtocolErrorException( msg, ne );
             errors.add( error );
-            LOG.info( msg );
+
+            if ( LOG.isInfoEnabled() )
+            {
+                LOG.info( msg );
+            }
         }
     }
 
@@ -779,7 +783,11 @@ public class Registries implements SchemaLoaderListener, Cloneable
 
             Throwable error = new LdapSchemaViolationException( ResultCodeEnum.INVALID_ATTRIBUTE_SYNTAX, msg, ne );
             errors.add( error );
-            LOG.info( msg );
+
+            if ( LOG.isInfoEnabled() )
+            {
+                LOG.info( msg );
+            }
         }
     }
 
@@ -1547,7 +1555,10 @@ public class Registries implements SchemaLoaderListener, Cloneable
      */
     private void register( List<Throwable> errors, SchemaObject schemaObject ) throws LdapException
     {
-        LOG.debug( I18n.msg( I18n.MSG_13720_REGISTRING, schemaObject.getObjectType(), schemaObject.getOid() ) );
+        if ( LOG.isDebugEnabled() )
+        {
+            LOG.debug( I18n.msg( I18n.MSG_13720_REGISTRING, schemaObject.getObjectType(), schemaObject.getOid() ) );
+        }
 
         // Check that the SchemaObject is not already registered
         if ( !( schemaObject instanceof LoadableSchemaObject ) && globalOidRegistry.contains( schemaObject.getOid() ) )
@@ -1629,7 +1640,10 @@ public class Registries implements SchemaLoaderListener, Cloneable
      */
     public void associateWithSchema( List<Throwable> errors, SchemaObject schemaObject )
     {
-        LOG.debug( I18n.msg( I18n.MSG_13720_REGISTRING, schemaObject.getObjectType(), schemaObject.getOid() ) );
+        if ( LOG.isDebugEnabled() )
+        {
+            LOG.debug( I18n.msg( I18n.MSG_13720_REGISTRING, schemaObject.getObjectType(), schemaObject.getOid() ) );
+        }
 
         // Check that the SchemaObject is not already registered
         if ( !( schemaObject instanceof LoadableSchemaObject ) && globalOidRegistry.contains( schemaObject.getOid() ) )
@@ -1659,8 +1673,11 @@ public class Registries implements SchemaLoaderListener, Cloneable
         {
             // Already present !
             // What should we do ?
-            LOG.info( I18n.msg( I18n.MSG_13719_REGISTRING_FAILED_ALREADY_PRESENT,
-                schemaObject.getObjectType(), schemaObject.getOid() ) );
+            if ( LOG.isInfoEnabled() )
+            {
+                LOG.info( I18n.msg( I18n.MSG_13719_REGISTRING_FAILED_ALREADY_PRESENT,
+                    schemaObject.getObjectType(), schemaObject.getOid() ) );
+            }
         }
         else
         {
@@ -1682,7 +1699,10 @@ public class Registries implements SchemaLoaderListener, Cloneable
                 }
             }
 
-            LOG.debug( I18n.msg( I18n.MSG_13731_REGISTRED_FOR_OID, schemaObject.getName(), schemaObject.getOid() ) );
+            if ( LOG.isDebugEnabled() )
+            {
+                LOG.debug( I18n.msg( I18n.MSG_13731_REGISTRED_FOR_OID, schemaObject.getName(), schemaObject.getOid() ) );
+            }
         }
     }
 
@@ -1698,7 +1718,10 @@ public class Registries implements SchemaLoaderListener, Cloneable
 
     public void dissociateFromSchema( List<Throwable> errors, SchemaObject schemaObject ) throws LdapException
     {
-        LOG.debug( I18n.msg( I18n.MSG_13741_UNREGISTRING, schemaObject.getObjectType(), schemaObject.getOid() ) );
+        if ( LOG.isDebugEnabled() )
+        {
+            LOG.debug( I18n.msg( I18n.MSG_13741_UNREGISTRING, schemaObject.getObjectType(), schemaObject.getOid() ) );
+        }
 
         // Check that the SchemaObject is already registered
         if ( !( schemaObject instanceof LoadableSchemaObject ) && !globalOidRegistry.contains( schemaObject.getOid() ) )
@@ -1723,8 +1746,11 @@ public class Registries implements SchemaLoaderListener, Cloneable
         {
             // Not present !
             // What should we do ?
-            LOG.info( I18n.msg( I18n.MSG_13739_UNREGISTERED_FAILED_NOT_PRESENT, schemaObject.getObjectType(),
-                schemaObject.getOid() ) );
+            if ( LOG.isInfoEnabled() )
+            {
+                LOG.info( I18n.msg( I18n.MSG_13739_UNREGISTERED_FAILED_NOT_PRESENT, schemaObject.getObjectType(),
+                    schemaObject.getOid() ) );
+            }
         }
         else
         {
@@ -1746,7 +1772,10 @@ public class Registries implements SchemaLoaderListener, Cloneable
                 }
             }
 
-            LOG.debug( I18n.msg( I18n.MSG_13737_UNREGISTERED_FOR_OID, schemaObject.getName(), schemaObject.getOid() ) );
+            if ( LOG.isDebugEnabled() )
+            {
+                LOG.debug( I18n.msg( I18n.MSG_13737_UNREGISTERED_FOR_OID, schemaObject.getName(), schemaObject.getOid() ) );
+            }
         }
     }
 
@@ -1759,7 +1788,10 @@ public class Registries implements SchemaLoaderListener, Cloneable
      */
     private SchemaObject unregister( List<Throwable> errors, SchemaObject schemaObject ) throws LdapException
     {
-        LOG.debug( I18n.msg( I18n.MSG_13741_UNREGISTRING, schemaObject.getObjectType(), schemaObject.getOid() ) );
+        if ( LOG.isDebugEnabled() )
+        {
+            LOG.debug( I18n.msg( I18n.MSG_13741_UNREGISTRING, schemaObject.getObjectType(), schemaObject.getOid() ) );
+        }
 
         // Check that the SchemaObject is present in the registries
         if ( !( schemaObject instanceof LoadableSchemaObject ) && !globalOidRegistry.contains( schemaObject.getOid() ) )
@@ -1855,14 +1887,20 @@ public class Registries implements SchemaLoaderListener, Cloneable
                     globalOidRegistry.unregister( schemaObject.getOid() );
                 }
 
-                LOG.debug( I18n.msg( I18n.MSG_13738_UNREGISTERED, schemaObject.getObjectType(), schemaObject.getOid() ) );
+                if ( LOG.isDebugEnabled() )
+                {
+                    LOG.debug( I18n.msg( I18n.MSG_13738_UNREGISTERED, schemaObject.getObjectType(), schemaObject.getOid() ) );
+                }
             }
             else
             {
                 // Not present !!
                 // What should we do ?
-                LOG.debug( I18n.msg( I18n.MSG_13740_UNREGISTERED_FAILED_NOT_FOUND, schemaObject.getObjectType() ),
-                    schemaObject.getOid() );
+                if ( LOG.isDebugEnabled() )
+                {
+                    LOG.debug( I18n.msg( I18n.MSG_13740_UNREGISTERED_FAILED_NOT_FOUND, schemaObject.getObjectType() ),
+                        schemaObject.getOid() );
+                }
             }
         }
     }
@@ -2218,8 +2256,11 @@ public class Registries implements SchemaLoaderListener, Cloneable
         // Check the references : Syntax -> SyntaxChecker
         if ( !using.containsKey( referenceWrapper ) )
         {
-            LOG.debug( 
-                I18n.msg( I18n.MSG_13730_SYN_DOES_NOT_REFERENCE, reference.getObjectType(), reference.getOid(), message ) );
+            if ( LOG.isDebugEnabled() )
+            {
+                LOG.debug( 
+                    I18n.msg( I18n.MSG_13730_SYN_DOES_NOT_REFERENCE, reference.getObjectType(), reference.getOid(), message ) );
+            }
 
             return false;
         }
@@ -2228,7 +2269,10 @@ public class Registries implements SchemaLoaderListener, Cloneable
 
         if ( !usings.contains( refereeWrapper ) )
         {
-            LOG.debug( I18n.msg( I18n.MSG_13732_NOT_REFERENCE_ANY, reference.getObjectType(), reference.getOid(), message ) );
+            if ( LOG.isDebugEnabled() )
+            {
+                LOG.debug( I18n.msg( I18n.MSG_13732_NOT_REFERENCE_ANY, reference.getObjectType(), reference.getOid(), message ) );
+            }
 
             return false;
         }
@@ -2236,7 +2280,10 @@ public class Registries implements SchemaLoaderListener, Cloneable
         // Check the referees : SyntaxChecker -> Syntax
         if ( !usedBy.containsKey( refereeWrapper ) )
         {
-            LOG.debug( I18n.msg( I18n.MSG_13733_NOT_REFERENCED_BY_ANY, referee.getObjectType(), referee.getOid(), message ) );
+            if ( LOG.isDebugEnabled() )
+            {
+                LOG.debug( I18n.msg( I18n.MSG_13733_NOT_REFERENCED_BY_ANY, referee.getObjectType(), referee.getOid(), message ) );
+            }
 
             return false;
         }
@@ -2245,7 +2292,10 @@ public class Registries implements SchemaLoaderListener, Cloneable
 
         if ( !used.contains( referenceWrapper ) )
         {
-            LOG.debug( I18n.msg( I18n.MSG_13733_NOT_REFERENCED_BY_ANY, referee.getObjectType(), referee.getOid(), message ) );
+            if ( LOG.isDebugEnabled() )
+            {
+                LOG.debug( I18n.msg( I18n.MSG_13733_NOT_REFERENCED_BY_ANY, referee.getObjectType(), referee.getOid(), message ) );
+            }
 
             return false;
         }
@@ -2262,22 +2312,31 @@ public class Registries implements SchemaLoaderListener, Cloneable
     public boolean check()
     {
         // Check the Syntaxes : check for a SyntaxChecker
-        LOG.debug( I18n.msg( I18n.MSG_13717_CHECKING_SYNTAXES ) );
+        if ( LOG.isDebugEnabled() )
+        {
+            LOG.debug( I18n.msg( I18n.MSG_13717_CHECKING_SYNTAXES ) );
+        }
 
         for ( LdapSyntax syntax : ldapSyntaxRegistry )
         {
             // Check that each Syntax has a SyntaxChecker
             if ( syntax.getSyntaxChecker() == null )
             {
-                LOG.debug( I18n.msg( I18n.MSG_13729_SYN_WITH_NO_SYNTAX_CHECKER, syntax ) );
+                if ( LOG.isDebugEnabled() )
+                {
+                    LOG.debug( I18n.msg( I18n.MSG_13729_SYN_WITH_NO_SYNTAX_CHECKER, syntax ) );
+                }
 
                 return false;
             }
 
             if ( !syntaxCheckerRegistry.contains( syntax.getSyntaxChecker().getOid() ) )
             {
-                LOG.debug( I18n.msg( I18n.MSG_13713_CANT_FIND_SC_FOR_SYN, syntax.getSyntaxChecker().getOid(),
-                    syntax ) );
+                if ( LOG.isDebugEnabled() )
+                {
+                    LOG.debug( I18n.msg( I18n.MSG_13713_CANT_FIND_SC_FOR_SYN, syntax.getSyntaxChecker().getOid(),
+                        syntax ) );
+                }
 
                 return false;
             }
@@ -2290,14 +2349,20 @@ public class Registries implements SchemaLoaderListener, Cloneable
         }
 
         // Check the MatchingRules : check for a Normalizer, a Comparator and a Syntax
-        LOG.debug( I18n.msg( I18n.MSG_13715_CHECKING_MATCHING_RULES ) );
+        if ( LOG.isDebugEnabled() )
+        {
+            LOG.debug( I18n.msg( I18n.MSG_13715_CHECKING_MATCHING_RULES ) );
+        }
 
         for ( MatchingRule matchingRule : matchingRuleRegistry )
         {
             // Check that each MatchingRule has a Normalizer
             if ( matchingRule.getNormalizer() == null )
             {
-                LOG.debug( I18n.msg( I18n.MSG_13727_MR_WITH_NO_NORMALIZER, matchingRule ) );
+                if ( LOG.isDebugEnabled() )
+                {
+                    LOG.debug( I18n.msg( I18n.MSG_13727_MR_WITH_NO_NORMALIZER, matchingRule ) );
+                }
 
                 return false;
             }
@@ -2305,8 +2370,11 @@ public class Registries implements SchemaLoaderListener, Cloneable
             // Check that each MatchingRule has a Normalizer
             if ( !normalizerRegistry.contains( matchingRule.getNormalizer().getOid() ) )
             {
-                LOG.debug( I18n.msg( I18n.MSG_13709_CANT_FIND_NORM_FOR_MR, matchingRule.getNormalizer()
-                    .getOid(), matchingRule ) );
+                if ( LOG.isDebugEnabled() )
+                {
+                    LOG.debug( I18n.msg( I18n.MSG_13709_CANT_FIND_NORM_FOR_MR, matchingRule.getNormalizer()
+                        .getOid(), matchingRule ) );
+                }
 
                 return false;
             }
@@ -2314,15 +2382,21 @@ public class Registries implements SchemaLoaderListener, Cloneable
             // Check that each MatchingRule has a Comparator
             if ( matchingRule.getLdapComparator() == null )
             {
-                LOG.debug( I18n.msg( I18n.MSG_13726_MR_WITH_NO_COMPARATOR, matchingRule ) );
+                if ( LOG.isDebugEnabled() )
+                {
+                    LOG.debug( I18n.msg( I18n.MSG_13726_MR_WITH_NO_COMPARATOR, matchingRule ) );
+                }
 
                 return false;
             }
 
             if ( !comparatorRegistry.contains( matchingRule.getLdapComparator().getOid() ) )
             {
-                LOG.debug( I18n.msg( I18n.MSG_13707_CANT_FIND_AT_FOR_MR, matchingRule.getLdapComparator().getOid(), 
-                    matchingRule ) );
+                if ( LOG.isDebugEnabled() )
+                {
+                    LOG.debug( I18n.msg( I18n.MSG_13707_CANT_FIND_AT_FOR_MR, matchingRule.getLdapComparator().getOid(), 
+                        matchingRule ) );
+                } 
 
                 return false;
             }
@@ -2330,16 +2404,22 @@ public class Registries implements SchemaLoaderListener, Cloneable
             // Check that each MatchingRule has a Syntax
             if ( matchingRule.getSyntax() == null )
             {
-                LOG.debug( I18n.msg( I18n.MSG_13728_MR_WITH_NO_SYNTAX, matchingRule ) );
+                if ( LOG.isDebugEnabled() )
+                {
+                    LOG.debug( I18n.msg( I18n.MSG_13728_MR_WITH_NO_SYNTAX, matchingRule ) );
+                }
 
                 return false;
             }
 
             if ( !ldapSyntaxRegistry.contains( matchingRule.getSyntax().getOid() ) )
             {
-                LOG.debug( I18n.msg( I18n.MSG_13712_CANT_FIND_SYN_FOR_MR, matchingRule.getSyntax().getOid(),
-                    matchingRule ) );
-
+                if ( LOG.isDebugEnabled() )
+                {
+                    LOG.debug( I18n.msg( I18n.MSG_13712_CANT_FIND_SYN_FOR_MR, matchingRule.getSyntax().getOid(),
+                        matchingRule ) );
+                }
+                    
                 return false;
             }
 
@@ -2363,7 +2443,10 @@ public class Registries implements SchemaLoaderListener, Cloneable
         }
 
         // Check the ObjectClasses : check for MAY, MUST, SUPERIORS
-        LOG.debug( I18n.msg( I18n.MSG_13716_CHECKING_OBJECT_CLASSES ) );
+        if ( LOG.isDebugEnabled() )
+        {
+            LOG.debug( I18n.msg( I18n.MSG_13716_CHECKING_OBJECT_CLASSES ) );
+        }
 
         for ( ObjectClass objectClass : objectClassRegistry )
         {
@@ -2374,7 +2457,10 @@ public class Registries implements SchemaLoaderListener, Cloneable
                 {
                     if ( !attributeTypeRegistry.contains( may.getOid() ) )
                     {
-                        LOG.debug( I18n.msg( I18n.MSG_13705_CANT_FIND_AT_IN_MAY, may, objectClass ) );
+                        if ( LOG.isDebugEnabled() )
+                        {
+                            LOG.debug( I18n.msg( I18n.MSG_13705_CANT_FIND_AT_IN_MAY, may, objectClass ) );
+                        }
 
                         return false;
                     }
@@ -2394,7 +2480,10 @@ public class Registries implements SchemaLoaderListener, Cloneable
                 {
                     if ( !attributeTypeRegistry.contains( must.getOid() ) )
                     {
-                        LOG.debug( I18n.msg( I18n.MSG_13706_CANT_FIND_AT_IN_MUST, must, objectClass ) );
+                        if ( LOG.isDebugEnabled() )
+                        {
+                            LOG.debug( I18n.msg( I18n.MSG_13706_CANT_FIND_AT_IN_MUST, must, objectClass ) );
+                        }
 
                         return false;
                     }
@@ -2414,7 +2503,10 @@ public class Registries implements SchemaLoaderListener, Cloneable
                 {
                     if ( !objectClassRegistry.contains( objectClass.getOid() ) )
                     {
-                        LOG.debug( I18n.msg( I18n.MSG_13710_CANT_FIND_OC_WITH_SUPERIOR, superior, objectClass ) );
+                        if ( LOG.isDebugEnabled() )
+                        {
+                            LOG.debug( I18n.msg( I18n.MSG_13710_CANT_FIND_OC_WITH_SUPERIOR, superior, objectClass ) );
+                        }
 
                         return false;
                     }
@@ -2429,22 +2521,31 @@ public class Registries implements SchemaLoaderListener, Cloneable
         }
 
         // Check the AttributeTypes : check for MatchingRules, Syntaxes
-        LOG.debug( I18n.msg( I18n.MSG_13714_CHECKING_ATTRIBUTE_TYPES ) );
+        if ( LOG.isDebugEnabled() )
+        {
+            LOG.debug( I18n.msg( I18n.MSG_13714_CHECKING_ATTRIBUTE_TYPES ) );
+        }
 
         for ( AttributeType attributeType : attributeTypeRegistry )
         {
             // Check that each AttributeType has a SYNTAX
             if ( attributeType.getSyntax() == null )
             {
-                LOG.debug( I18n.msg( I18n.MSG_13725_AT_WITH_NO_SYNTAX, attributeType ) );
+                if ( LOG.isDebugEnabled() )
+                {
+                    LOG.debug( I18n.msg( I18n.MSG_13725_AT_WITH_NO_SYNTAX, attributeType ) );
+                }
 
                 return false;
             }
 
             if ( !ldapSyntaxRegistry.contains( attributeType.getSyntax().getOid() ) )
             {
-                LOG.debug( I18n.msg( I18n.MSG_13711_CANT_FIND_SYN_FOR_AT, attributeType.getSyntax().getOid(),
-                    attributeType ) );
+                if ( LOG.isDebugEnabled() )
+                {
+                    LOG.debug( I18n.msg( I18n.MSG_13711_CANT_FIND_SYN_FOR_AT, attributeType.getSyntax().getOid(),
+                        attributeType ) );
+                }
 
                 return false;
             }
@@ -2460,8 +2561,11 @@ public class Registries implements SchemaLoaderListener, Cloneable
             {
                 if ( !matchingRuleRegistry.contains( attributeType.getEquality().getOid() ) )
                 {
-                    LOG.debug( I18n.msg( I18n.MSG_13708_CANT_FIND_MR_FOR_AT, attributeType.getEquality()
-                        .getOid(), attributeType ) );
+                    if ( LOG.isDebugEnabled() )
+                    {
+                        LOG.debug( I18n.msg( I18n.MSG_13708_CANT_FIND_MR_FOR_AT, attributeType.getEquality()
+                            .getOid(), attributeType ) );
+                    }
 
                     return false;
                 }
@@ -2478,8 +2582,11 @@ public class Registries implements SchemaLoaderListener, Cloneable
             {
                 if ( !matchingRuleRegistry.contains( attributeType.getOrdering().getOid() ) )
                 {
-                    LOG.debug( I18n.msg( I18n.MSG_13708_CANT_FIND_MR_FOR_AT, attributeType.getOrdering()
-                        .getOid(), attributeType ) );
+                    if ( LOG.isDebugEnabled() )
+                    {
+                        LOG.debug( I18n.msg( I18n.MSG_13708_CANT_FIND_MR_FOR_AT, attributeType.getOrdering()
+                            .getOid(), attributeType ) );
+                    }
 
                     return false;
                 }
@@ -2496,8 +2603,11 @@ public class Registries implements SchemaLoaderListener, Cloneable
             {
                 if ( !matchingRuleRegistry.contains( attributeType.getSubstring().getOid() ) )
                 {
-                    LOG.debug( I18n.msg( I18n.MSG_13708_CANT_FIND_MR_FOR_AT, attributeType.getSubstring()
-                        .getOid(), attributeType ) );
+                    if ( LOG.isDebugEnabled() )
+                    {
+                        LOG.debug( I18n.msg( I18n.MSG_13708_CANT_FIND_MR_FOR_AT, attributeType.getSubstring()
+                            .getOid(), attributeType ) );
+                    }
 
                     return false;
                 }
@@ -2516,7 +2626,10 @@ public class Registries implements SchemaLoaderListener, Cloneable
 
                 if ( !attributeTypeRegistry.contains( superior.getOid() ) )
                 {
-                    LOG.debug( I18n.msg( I18n.MSG_13704_CANT_FIND_AT_WITH_SUPERIOR, superior, attributeType ) );
+                    if ( LOG.isDebugEnabled() )
+                    {
+                        LOG.debug( I18n.msg( I18n.MSG_13704_CANT_FIND_AT_WITH_SUPERIOR, superior, attributeType ) );
+                    }
 
                     return false;
                 }
diff --git a/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/registries/helper/AttributeTypeHelper.java b/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/registries/helper/AttributeTypeHelper.java
index 8652348..17a9b62 100644
--- a/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/registries/helper/AttributeTypeHelper.java
+++ b/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/registries/helper/AttributeTypeHelper.java
@@ -170,7 +170,11 @@ public final class AttributeTypeHelper
                 ldapSchemaException.setSourceObject( attributeType );
                 ldapSchemaException.setRelatedId( superiorOid );
                 errors.add( ldapSchemaException );
-                LOG.info( msg );
+
+                if ( LOG.isInfoEnabled() )
+                {
+                    LOG.info( msg );
+                }
 
                 // Get out now
                 return false;
@@ -188,7 +192,11 @@ public final class AttributeTypeHelper
                         LdapSchemaExceptionCodes.AT_CANNOT_SUBTYPE_COLLECTIVE_AT, msg );
                     ldapSchemaException.setSourceObject( attributeType );
                     errors.add( ldapSchemaException );
-                    LOG.info( msg );
+
+                    if ( LOG.isInfoEnabled() )
+                    {
+                        LOG.info( msg );
+                    }
                     
                     return false;
                 }
@@ -211,7 +219,11 @@ public final class AttributeTypeHelper
                 catch ( LdapException ne )
                 {
                     errors.add( ne );
-                    LOG.info( ne.getMessage() );
+
+                    if ( LOG.isInfoEnabled() )
+                    {
+                        LOG.info( ne.getMessage() );
+                    }
                     
                     return false;
                 }
@@ -234,7 +246,12 @@ public final class AttributeTypeHelper
                             LdapSchemaExceptionCodes.AT_CYCLE_TYPE_HIERARCHY, msg );
                         ldapSchemaException.setSourceObject( attributeType );
                         errors.add( ldapSchemaException );
-                        LOG.info( msg );
+
+                        if ( LOG.isInfoEnabled() )
+                        {
+                            LOG.info( msg );
+                        }
+
                         isOk = false;
 
                         break;
@@ -260,7 +277,11 @@ public final class AttributeTypeHelper
                 ldapSchemaException.setSourceObject( attributeType );
                 ldapSchemaException.setRelatedId( superiorOid );
                 errors.add( ldapSchemaException );
-                LOG.info( msg );
+
+                if ( LOG.isInfoEnabled() )
+                {
+                    LOG.info( msg );
+                }
 
                 // Get out now
                 return false;
@@ -299,7 +320,11 @@ public final class AttributeTypeHelper
                 ldapSchemaException.setSourceObject( attributeType );
                 ldapSchemaException.setRelatedId( syntaxOid );
                 errors.add( ldapSchemaException );
-                LOG.info( msg );
+
+                if ( LOG.isInfoEnabled() )
+                {
+                    LOG.info( msg );
+                }
                 
                 return;
             }
@@ -319,7 +344,11 @@ public final class AttributeTypeHelper
                 ldapSchemaException.setSourceObject( attributeType );
                 ldapSchemaException.setRelatedId( syntaxOid );
                 errors.add( ldapSchemaException );
-                LOG.info( msg );
+
+                if ( LOG.isInfoEnabled() )
+                {
+                    LOG.info( msg );
+                }
                 
                 return;
             }
@@ -342,7 +371,11 @@ public final class AttributeTypeHelper
                     ldapSchemaException.setSourceObject( attributeType );
                     ldapSchemaException.setRelatedId( syntaxOid );
                     errors.add( ldapSchemaException );
-                    LOG.info( msg );
+
+                    if ( LOG.isInfoEnabled() )
+                    {
+                        LOG.info( msg );
+                    }
                     
                     return;
                 }
@@ -356,7 +389,11 @@ public final class AttributeTypeHelper
                     LdapSchemaExceptionCodes.AT_SYNTAX_OR_SUPERIOR_REQUIRED, msg );
                 ldapSchemaException.setSourceObject( attributeType );
                 errors.add( ldapSchemaException );
-                LOG.info( msg );
+
+                if ( LOG.isInfoEnabled() )
+                {
+                    LOG.info( msg );
+                }
                 
                 return;
             }
@@ -390,7 +427,11 @@ public final class AttributeTypeHelper
                 ldapSchemaException.setSourceObject( attributeType );
                 ldapSchemaException.setRelatedId( equalityOid );
                 errors.add( ldapSchemaException );
-                LOG.info( msg );
+
+                if ( LOG.isInfoEnabled() )
+                {
+                    LOG.info( msg );
+                }
                 
                 return;
             }
@@ -412,7 +453,11 @@ public final class AttributeTypeHelper
                 ldapSchemaException.setSourceObject( attributeType );
                 ldapSchemaException.setRelatedId( equalityOid );
                 errors.add( ldapSchemaException );
-                LOG.info( msg );
+
+                if ( LOG.isInfoEnabled() )
+                {
+                    LOG.info( msg );
+                }
             }
         }
         else
@@ -454,7 +499,11 @@ public final class AttributeTypeHelper
                 ldapSchemaException.setSourceObject( attributeType );
                 ldapSchemaException.setRelatedId( substringOid );
                 errors.add( ldapSchemaException );
-                LOG.info( msg );
+
+                if ( LOG.isInfoEnabled() )
+                {
+                    LOG.info( msg );
+                }
                 
                 return;
             }
@@ -473,7 +522,11 @@ public final class AttributeTypeHelper
                 ldapSchemaException.setSourceObject( attributeType );
                 ldapSchemaException.setRelatedId( substringOid );
                 errors.add( ldapSchemaException );
-                LOG.info( msg );
+
+                if ( LOG.isInfoEnabled() )
+                {
+                    LOG.info( msg );
+                }
                 
                 return;
             }
@@ -520,7 +573,11 @@ public final class AttributeTypeHelper
                 ldapSchemaException.setSourceObject( attributeType );
                 ldapSchemaException.setRelatedId( orderingOid );
                 errors.add( ldapSchemaException );
-                LOG.info( msg );
+
+                if ( LOG.isInfoEnabled() )
+                {
+                    LOG.info( msg );
+                }
                 
                 return;
             }
@@ -539,7 +596,11 @@ public final class AttributeTypeHelper
                 ldapSchemaException.setSourceObject( attributeType );
                 ldapSchemaException.setRelatedId( orderingOid );
                 errors.add( ldapSchemaException );
-                LOG.info( msg );
+
+                if ( LOG.isInfoEnabled() )
+                {
+                    LOG.info( msg );
+                }
             }
         }
         else
@@ -572,7 +633,11 @@ public final class AttributeTypeHelper
                 LdapSchemaExceptionCodes.AT_MUST_HAVE_SAME_USAGE_THAN_SUPERIOR, msg );
             ldapSchemaException.setSourceObject( attributeType );
             errors.add( ldapSchemaException );
-            LOG.info( msg );
+
+            if ( LOG.isInfoEnabled() )
+            {
+                LOG.info( msg );
+            }
             
             return;
         }
@@ -587,7 +652,11 @@ public final class AttributeTypeHelper
                 LdapSchemaExceptionCodes.AT_USER_APPLICATIONS_USAGE_MUST_BE_USER_MODIFIABLE, msg );
             ldapSchemaException.setSourceObject( attributeType );
             errors.add( ldapSchemaException );
-            LOG.info( msg );
+
+            if ( LOG.isInfoEnabled() )
+            {
+                LOG.info( msg );
+            }
         }
     }
 
@@ -614,7 +683,11 @@ public final class AttributeTypeHelper
                 LdapSchemaExceptionCodes.AT_COLLECTIVE_MUST_HAVE_USER_APPLICATIONS_USAGE, msg );
             ldapSchemaException.setSourceObject( attributeType );
             errors.add( ldapSchemaException );
-            LOG.info( msg );
+
+            if ( LOG.isInfoEnabled() )
+            {
+                LOG.info( msg );
+            }
         }
 
         if ( attributeType.isCollective() && attributeType.isSingleValued() )
@@ -626,7 +699,11 @@ public final class AttributeTypeHelper
                 LdapSchemaExceptionCodes.AT_COLLECTIVE_CANNOT_BE_SINGLE_VALUED, msg );
             ldapSchemaException.setSourceObject( attributeType );
             errors.add( ldapSchemaException );
-            LOG.info( msg );
+
+            if ( LOG.isInfoEnabled() )
+            {
+                LOG.info( msg );
+            }
         }
     }
     
diff --git a/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/registries/helper/MatchingRuleHelper.java b/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/registries/helper/MatchingRuleHelper.java
index 963d6f8..1090cb2 100644
--- a/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/registries/helper/MatchingRuleHelper.java
+++ b/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/registries/helper/MatchingRuleHelper.java
@@ -115,7 +115,11 @@ public final class MatchingRuleHelper
                     ldapSchemaException.setSourceObject( matchingRule );
                     ldapSchemaException.setRelatedId( matchingRule.getSyntaxOid() );
                     errors.add( ldapSchemaException );
-                    LOG.info( msg );
+
+                    if ( LOG.isInfoEnabled() )
+                    {
+                        LOG.info( msg );
+                    }
                 }
 
                 /**
diff --git a/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/registries/helper/ObjectClassHelper.java b/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/registries/helper/ObjectClassHelper.java
index 0934517..e0ebac8 100644
--- a/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/registries/helper/ObjectClassHelper.java
+++ b/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/registries/helper/ObjectClassHelper.java
@@ -137,7 +137,11 @@ public final class ObjectClassHelper
                                     LdapSchemaExceptionCodes.OC_ABSTRACT_MUST_INHERIT_FROM_ABSTRACT_OC, msg );
                                 ldapSchemaException.setSourceObject( objectClass );
                                 errors.add( ldapSchemaException );
-                                LOG.info( msg );
+
+                                if ( LOG.isInfoEnabled() )
+                                {
+                                    LOG.info( msg );
+                                }
 
                                 continue;
                             }
@@ -154,7 +158,11 @@ public final class ObjectClassHelper
                                     LdapSchemaExceptionCodes.OC_AUXILIARY_CANNOT_INHERIT_FROM_STRUCTURAL_OC, msg );
                                 ldapSchemaException.setSourceObject( objectClass );
                                 errors.add( ldapSchemaException );
-                                LOG.info( msg );
+
+                                if ( LOG.isInfoEnabled() )
+                                {
+                                    LOG.info( msg );
+                                }
 
                                 continue;
                             }
@@ -171,7 +179,11 @@ public final class ObjectClassHelper
                                     LdapSchemaExceptionCodes.OC_STRUCTURAL_CANNOT_INHERIT_FROM_AUXILIARY_OC, msg );
                                 ldapSchemaException.setSourceObject( objectClass );
                                 errors.add( ldapSchemaException );
-                                LOG.info( msg );
+
+                                if ( LOG.isInfoEnabled() )
+                                {
+                                    LOG.info( msg );
+                                }
 
                                 continue;
                             }
@@ -196,7 +208,11 @@ public final class ObjectClassHelper
                     ldapSchemaException.setSourceObject( objectClass );
                     ldapSchemaException.setRelatedId( superiorName );
                     errors.add( ldapSchemaException );
-                    LOG.info( msg );
+
+                    if ( LOG.isInfoEnabled() )
+                    {
+                        LOG.info( msg );
+                    }
 
                     return;
                 }
@@ -234,7 +250,11 @@ public final class ObjectClassHelper
                         ldapSchemaException.setSourceObject( objectClass );
                         ldapSchemaException.setRelatedId( mustAttributeTypeName );
                         errors.add( ldapSchemaException );
-                        LOG.info( msg );
+
+                        if ( LOG.isInfoEnabled() )
+                        {
+                            LOG.info( msg );
+                        }
 
                         continue;
                     }
@@ -250,7 +270,11 @@ public final class ObjectClassHelper
                         ldapSchemaException.setSourceObject( objectClass );
                         ldapSchemaException.setRelatedId( mustAttributeTypeName );
                         errors.add( ldapSchemaException );
-                        LOG.info( msg );
+
+                        if ( LOG.isInfoEnabled() )
+                        {
+                            LOG.info( msg );
+                        }
 
                         continue;
                     }
@@ -268,7 +292,11 @@ public final class ObjectClassHelper
                         ldapSchemaException.setSourceObject( objectClass );
                         ldapSchemaException.setRelatedId( mustAttributeTypeName );
                         errors.add( ldapSchemaException );
-                        LOG.info( msg );
+
+                        if ( LOG.isInfoEnabled() )
+                        {
+                            LOG.info( msg );
+                        }
 
                         continue;
                     }
@@ -286,7 +314,11 @@ public final class ObjectClassHelper
                     ldapSchemaException.setSourceObject( objectClass );
                     ldapSchemaException.setRelatedId( mustAttributeTypeName );
                     errors.add( ldapSchemaException );
-                    LOG.info( msg );
+
+                    if ( LOG.isInfoEnabled() )
+                    {
+                        LOG.info( msg );
+                    }
 
                     continue;
                 }
@@ -323,7 +355,11 @@ public final class ObjectClassHelper
                         ldapSchemaException.setSourceObject( objectClass );
                         ldapSchemaException.setRelatedId( mayAttributeTypeName );
                         errors.add( ldapSchemaException );
-                        LOG.info( msg );
+
+                        if ( LOG.isInfoEnabled() )
+                        {
+                            LOG.info( msg );
+                        }
 
                         continue;
                     }
@@ -339,7 +375,11 @@ public final class ObjectClassHelper
                         ldapSchemaException.setSourceObject( objectClass );
                         ldapSchemaException.setRelatedId( mayAttributeTypeName );
                         errors.add( ldapSchemaException );
-                        LOG.info( msg );
+
+                        if ( LOG.isInfoEnabled() )
+                        {
+                            LOG.info( msg );
+                        }
 
                         continue;
                     }
@@ -356,7 +396,11 @@ public final class ObjectClassHelper
                     ldapSchemaException.setSourceObject( objectClass );
                     ldapSchemaException.setRelatedId( mayAttributeTypeName );
                     errors.add( ldapSchemaException );
-                    LOG.info( msg );
+
+                    if ( LOG.isInfoEnabled() )
+                    {
+                        LOG.info( msg );
+                    }
 
                     continue;
                 }
diff --git a/ldap/net/mina/src/main/java/org/apache/directory/api/ldap/codec/protocol/mina/LdapProtocolDecoder.java b/ldap/net/mina/src/main/java/org/apache/directory/api/ldap/codec/protocol/mina/LdapProtocolDecoder.java
index 5646e53..22a3175 100644
--- a/ldap/net/mina/src/main/java/org/apache/directory/api/ldap/codec/protocol/mina/LdapProtocolDecoder.java
+++ b/ldap/net/mina/src/main/java/org/apache/directory/api/ldap/codec/protocol/mina/LdapProtocolDecoder.java
@@ -54,9 +54,6 @@ public class LdapProtocolDecoder implements ProtocolDecoder
     /** The logger */
     private static final Logger CODEC_LOG = LoggerFactory.getLogger( Loggers.CODEC_LOG.getName() );
 
-    /** A speedup for logger */
-    private static final boolean IS_DEBUG = CODEC_LOG.isDebugEnabled();
-
     /** The ASN 1 decoder instance */
     private Asn1Decoder asn1Decoder;
 
@@ -120,7 +117,7 @@ public class LdapProtocolDecoder implements ProtocolDecoder
         {
             try
             {
-                if ( IS_DEBUG )
+                if ( CODEC_LOG.isDebugEnabled() )
                 {
                     CODEC_LOG.debug( I18n.msg( I18n.MSG_14000_DECODING_PDU ) );
 
@@ -146,7 +143,7 @@ public class LdapProtocolDecoder implements ProtocolDecoder
 
                 if ( messageContainer.getState() == TLVStateEnum.PDU_DECODED )
                 {
-                    if ( IS_DEBUG )
+                    if ( CODEC_LOG.isDebugEnabled() )
                     {
                         CODEC_LOG.debug( I18n.msg( I18n.MSG_14002_DECODED_LDAP_MESSAGE, messageContainer.getMessage() ) );
                     }
diff --git a/ldap/net/mina/src/main/java/org/apache/directory/api/ldap/codec/protocol/mina/LdapProtocolEncoder.java b/ldap/net/mina/src/main/java/org/apache/directory/api/ldap/codec/protocol/mina/LdapProtocolEncoder.java
index ed13ea1..ee5daa8 100644
--- a/ldap/net/mina/src/main/java/org/apache/directory/api/ldap/codec/protocol/mina/LdapProtocolEncoder.java
+++ b/ldap/net/mina/src/main/java/org/apache/directory/api/ldap/codec/protocol/mina/LdapProtocolEncoder.java
@@ -47,9 +47,6 @@ public class LdapProtocolEncoder implements ProtocolEncoder
     /** logger for reporting errors that might not be handled properly upstream */
     private static final Logger CODEC_LOG = LoggerFactory.getLogger( Loggers.CODEC_LOG.getName() );
 
-    /** A speedup for logger */
-    private static final boolean IS_DEBUG = CODEC_LOG.isDebugEnabled();
-
     /** The stateful encoder */
     private LdapEncoder encoder;
 
@@ -83,7 +80,7 @@ public class LdapProtocolEncoder implements ProtocolEncoder
 
         IoBuffer ioBuffer = IoBuffer.wrap( buffer );
 
-        if ( IS_DEBUG )
+        if ( CODEC_LOG.isDebugEnabled() )
         {
             byte[] dumpBuffer = new byte[buffer.limit()];
             buffer.get( dumpBuffer );
diff --git a/ldap/schema/converter/src/main/java/org/apache/directory/api/ldap/schema/converter/SchemaToLdif.java b/ldap/schema/converter/src/main/java/org/apache/directory/api/ldap/schema/converter/SchemaToLdif.java
index 48a315f..8393177 100644
--- a/ldap/schema/converter/src/main/java/org/apache/directory/api/ldap/schema/converter/SchemaToLdif.java
+++ b/ldap/schema/converter/src/main/java/org/apache/directory/api/ldap/schema/converter/SchemaToLdif.java
@@ -76,7 +76,11 @@ public final class SchemaToLdif
         // Bypass if no schemas have yet been defined 
         if ( ( schemas == null ) || schemas.isEmpty() )
         {
-            LOG.warn( I18n.msg( I18n.MSG_15000_NO_SCHEMA_DEFINED ) );
+            if ( LOG.isWarnEnabled() )
+            {
+                LOG.warn( I18n.msg( I18n.MSG_15000_NO_SCHEMA_DEFINED ) );
+            }
+            
             return;
         }
 
@@ -100,7 +104,11 @@ public final class SchemaToLdif
         {
             try
             {
-                LOG.info( I18n.msg( I18n.MSG_15001_GENERATING_SCHEMA, schema.getName() ) );
+                if ( LOG.isInfoEnabled() )
+                {
+                    LOG.info( I18n.msg( I18n.MSG_15001_GENERATING_SCHEMA, schema.getName() ) );
+                }
+                
                 generate( schema );
             }
             catch ( Exception e )
diff --git a/ldap/schema/data/src/main/java/org/apache/directory/api/ldap/schema/extractor/impl/DefaultSchemaLdifExtractor.java b/ldap/schema/data/src/main/java/org/apache/directory/api/ldap/schema/extractor/impl/DefaultSchemaLdifExtractor.java
index 566546b..29e5da0 100644
--- a/ldap/schema/data/src/main/java/org/apache/directory/api/ldap/schema/extractor/impl/DefaultSchemaLdifExtractor.java
+++ b/ldap/schema/data/src/main/java/org/apache/directory/api/ldap/schema/extractor/impl/DefaultSchemaLdifExtractor.java
@@ -88,13 +88,21 @@ public class DefaultSchemaLdifExtractor implements SchemaLdifExtractor
      */
     public DefaultSchemaLdifExtractor( File outputDirectory )
     {
-        LOG.debug( I18n.msg( I18n.MSG_16000_BASE_PATH, BASE_PATH, outputDirectory ) );
+        if ( LOG.isDebugEnabled() )
+        {
+            LOG.debug( I18n.msg( I18n.MSG_16000_BASE_PATH, BASE_PATH, outputDirectory ) );
+        }
+        
         this.outputDirectory = outputDirectory;
         File schemaDirectory = new File( outputDirectory, SCHEMA_SUBDIR );
 
         if ( !outputDirectory.exists() )
         {
-            LOG.debug( I18n.msg( I18n.MSG_16001_CREATING_DIR, outputDirectory ) );
+            if ( LOG.isDebugEnabled() )
+            {
+                LOG.debug( I18n.msg( I18n.MSG_16001_CREATING_DIR, outputDirectory ) );
+            }
+            
             if ( !outputDirectory.mkdir() )
             {
                 LOG.error( I18n.err( I18n.ERR_16042_OUTPUT_DIR_CREATION_FAIL, outputDirectory ) );
@@ -102,17 +110,28 @@ public class DefaultSchemaLdifExtractor implements SchemaLdifExtractor
         }
         else
         {
-            LOG.debug( I18n.msg( I18n.MSG_16002_DIR_EXISTS ) );
+            if ( LOG.isDebugEnabled() )
+            {
+                LOG.debug( I18n.msg( I18n.MSG_16002_DIR_EXISTS ) );
+            }
         }
 
         if ( !schemaDirectory.exists() )
         {
-            LOG.info( I18n.msg( I18n.MSG_16004_SCHEMA_DIR_ABSENT, schemaDirectory ) );
+            if ( LOG.isInfoEnabled() )
+            {
+                LOG.info( I18n.msg( I18n.MSG_16004_SCHEMA_DIR_ABSENT, schemaDirectory ) );
+            }
+            
             extracted = false;
         }
         else
         {
-            LOG.info( I18n.msg( I18n.MSG_16005_SCHEMA_DIR_PRESENT, schemaDirectory ) );
+            if ( LOG.isInfoEnabled() )
+            {
+                LOG.info( I18n.msg( I18n.MSG_16005_SCHEMA_DIR_PRESENT, schemaDirectory ) );
+            }
+            
             extracted = true;
         }
     }
@@ -201,7 +220,10 @@ public class DefaultSchemaLdifExtractor implements SchemaLdifExtractor
      */
     private void copyFile( File source, File destination ) throws IOException
     {
-        LOG.debug( I18n.msg( I18n.MSG_16003_COPYFILE, source, destination ) );
+        if ( LOG.isDebugEnabled() )
+        {
+            LOG.debug( I18n.msg( I18n.MSG_16003_COPYFILE, source, destination ) );
+        }
 
         if ( !destination.getParentFile().exists() && !destination.getParentFile().mkdirs() )
         {
diff --git a/ldap/schema/data/src/main/java/org/apache/directory/api/ldap/schema/extractor/impl/ResourceMap.java b/ldap/schema/data/src/main/java/org/apache/directory/api/ldap/schema/extractor/impl/ResourceMap.java
index 51c5f0a..6a7a6f2 100644
--- a/ldap/schema/data/src/main/java/org/apache/directory/api/ldap/schema/extractor/impl/ResourceMap.java
+++ b/ldap/schema/data/src/main/java/org/apache/directory/api/ldap/schema/extractor/impl/ResourceMap.java
@@ -86,7 +86,10 @@ public final class ResourceMap
 
         if ( schemaResourceLoc.trim().length() > 0 )
         {
-            LOG.debug( I18n.msg( I18n.MSG_16008_LOADING_FROM_USER_SCHEMA, schemaResourceLoc ) );
+            if ( LOG.isDebugEnabled() )
+            {
+                LOG.debug( I18n.msg( I18n.MSG_16008_LOADING_FROM_USER_SCHEMA, schemaResourceLoc ) );
+            }
 
             File file = new File( schemaResourceLoc );
 
@@ -116,7 +119,10 @@ public final class ResourceMap
         if ( !file.exists() )
         {
             // this may happen if the class path contains an element that doesn't exist
-            LOG.debug( I18n.msg( I18n.MSG_16009_ELEMENT_DOES_NOT_EXIST, element ) );
+            if ( LOG.isDebugEnabled() )
+            {
+                LOG.debug( I18n.msg( I18n.MSG_16009_ELEMENT_DOES_NOT_EXIST, element ) );
+            }
 
             return;
         }
diff --git a/ldap/schema/data/src/main/java/org/apache/directory/api/ldap/schema/loader/JarLdifSchemaLoader.java b/ldap/schema/data/src/main/java/org/apache/directory/api/ldap/schema/loader/JarLdifSchemaLoader.java
index 5d8bfa4..47c7626 100644
--- a/ldap/schema/data/src/main/java/org/apache/directory/api/ldap/schema/loader/JarLdifSchemaLoader.java
+++ b/ldap/schema/data/src/main/java/org/apache/directory/api/ldap/schema/loader/JarLdifSchemaLoader.java
@@ -66,9 +66,6 @@ public class JarLdifSchemaLoader extends AbstractSchemaLoader
     /** static class logger */
     private static final Logger LOG = LoggerFactory.getLogger( JarLdifSchemaLoader.class );
 
-    /** Speedup for DEBUG mode */
-    private static final boolean IS_DEBUG = LOG.isDebugEnabled();
-
     /** a map of all the resources in this jar */
     private static final Map<String, Boolean> RESOURCE_MAP = ResourceMap.getResources( Pattern
         .compile( "schema" + SEPARATOR_PATTERN + "ou=schema.*" ) );
@@ -110,7 +107,7 @@ public class JarLdifSchemaLoader extends AbstractSchemaLoader
      */
     private void initializeSchemas() throws IOException, LdapException
     {
-        if ( IS_DEBUG )
+        if ( LOG.isDebugEnabled() )
         {
             LOG.debug( I18n.msg( I18n.MSG_16006_INITIALIZING_SCHEMA ) );
         }
@@ -133,7 +130,7 @@ public class JarLdifSchemaLoader extends AbstractSchemaLoader
                     Schema schema = getSchema( entry.getEntry() );
                     schemaMap.put( schema.getSchemaName(), schema );
 
-                    if ( IS_DEBUG )
+                    if ( LOG.isDebugEnabled() )
                     {
                         LOG.debug( I18n.msg( I18n.MSG_16007_SCHEMA_INITIALIZED, schema ) );
                     }
diff --git a/ldap/schema/data/src/main/java/org/apache/directory/api/ldap/schema/loader/LdifSchemaLoader.java b/ldap/schema/data/src/main/java/org/apache/directory/api/ldap/schema/loader/LdifSchemaLoader.java
index 13b0cdc..9fe0b61 100644
--- a/ldap/schema/data/src/main/java/org/apache/directory/api/ldap/schema/loader/LdifSchemaLoader.java
+++ b/ldap/schema/data/src/main/java/org/apache/directory/api/ldap/schema/loader/LdifSchemaLoader.java
@@ -59,9 +59,6 @@ public class LdifSchemaLoader extends AbstractSchemaLoader
     /** static class logger */
     private static final Logger LOG = LoggerFactory.getLogger( LdifSchemaLoader.class );
 
-    /** Speedup for DEBUG mode */
-    private static final boolean IS_DEBUG = LOG.isDebugEnabled();
-
     /** directory containing the schema LDIF file for ou=schema */
     private final File baseDirectory;
 
@@ -106,7 +103,7 @@ public class LdifSchemaLoader extends AbstractSchemaLoader
             throw new FileNotFoundException( msg );
         }
 
-        if ( IS_DEBUG )
+        if ( LOG.isDebugEnabled() )
         {
             LOG.debug( I18n.msg( I18n.MSG_16010_USING_BASE_SCHEMA_DIR, baseDirectory ) );
         }
@@ -123,7 +120,7 @@ public class LdifSchemaLoader extends AbstractSchemaLoader
      */
     private void initializeSchemas() throws LdapException, IOException
     {
-        if ( IS_DEBUG )
+        if ( LOG.isDebugEnabled() )
         {
             LOG.debug( I18n.msg( I18n.MSG_16006_INITIALIZING_SCHEMA ) );
         }
@@ -151,7 +148,7 @@ public class LdifSchemaLoader extends AbstractSchemaLoader
 
                     schemaMap.put( schema.getSchemaName(), schema );
 
-                    if ( IS_DEBUG )
+                    if ( LOG.isDebugEnabled() )
                     {
                         LOG.debug( I18n.msg( I18n.MSG_16007_SCHEMA_INITIALIZED, schema ) );
                     }
diff --git a/ldap/schema/data/src/main/java/org/apache/directory/api/ldap/schema/loader/SchemaEntityFactory.java b/ldap/schema/data/src/main/java/org/apache/directory/api/ldap/schema/loader/SchemaEntityFactory.java
index 6afe881..877757b 100644
--- a/ldap/schema/data/src/main/java/org/apache/directory/api/ldap/schema/loader/SchemaEntityFactory.java
+++ b/ldap/schema/data/src/main/java/org/apache/directory/api/ldap/schema/loader/SchemaEntityFactory.java
@@ -121,7 +121,12 @@ public class SchemaEntityFactory implements EntityFactory
         if ( mOid == null )
         {
             String msg = I18n.err( I18n.ERR_16011_NULL_ATTRIBUTE, objectType, MetaSchemaConstants.M_OID_AT );
-            LOG.warn( msg );
+            
+            if ( LOG.isWarnEnabled() )
+            {
+                LOG.warn( msg );
+            }
+            
             throw new IllegalArgumentException( msg );
         }
 
@@ -130,7 +135,12 @@ public class SchemaEntityFactory implements EntityFactory
         if ( strict && !Oid.isOid( oid ) )
         {
             String msg = I18n.err( I18n.ERR_16012_INVALID_COMPARATOR_OID, oid );
-            LOG.warn( msg );
+            
+            if ( LOG.isWarnEnabled() )
+            {
+                LOG.warn( msg );
+            }
+            
             throw new LdapInvalidAttributeValueException( ResultCodeEnum.INVALID_ATTRIBUTE_SYNTAX, msg );
         }
 
@@ -150,14 +160,24 @@ public class SchemaEntityFactory implements EntityFactory
         if ( oid == null )
         {
             String msg = I18n.err( I18n.ERR_16011_NULL_ATTRIBUTE, objectType, MetaSchemaConstants.M_OID_AT );
-            LOG.warn( msg );
+            
+            if ( LOG.isWarnEnabled() )
+            {
+                LOG.warn( msg );
+            }
+            
             throw new IllegalArgumentException( msg );
         }
 
         if ( !Oid.isOid( oid ) )
         {
             String msg = I18n.err( I18n.ERR_16012_INVALID_COMPARATOR_OID, oid );
-            LOG.warn( msg );
+            
+            if ( LOG.isWarnEnabled() )
+            {
+                LOG.warn( msg );
+            }
+            
             throw new LdapInvalidAttributeValueException( ResultCodeEnum.INVALID_ATTRIBUTE_SYNTAX, msg );
         }
 
@@ -173,7 +193,12 @@ public class SchemaEntityFactory implements EntityFactory
         if ( entry == null )
         {
             String msg = I18n.err( I18n.ERR_16013_NULL_ENTRY, schemaEntity );
-            LOG.warn( msg );
+            
+            if ( LOG.isWarnEnabled() )
+            {
+                LOG.warn( msg );
+            }
+            
             throw new IllegalArgumentException( msg );
         }
     }
@@ -187,7 +212,12 @@ public class SchemaEntityFactory implements EntityFactory
         if ( description == null )
         {
             String msg = I18n.err( I18n.ERR_16014_NULL_SCHEMA_DESC, schemaEntity );
-            LOG.warn( msg );
+            
+            if ( LOG.isWarnEnabled() )
+            {
+                LOG.warn( msg );
+            }
+            
             throw new IllegalArgumentException( msg );
         }
     }
@@ -355,7 +385,12 @@ public class SchemaEntityFactory implements EntityFactory
         {
             // The schema is not loaded. We can't create the requested Normalizer
             String msg = I18n.err( I18n.ERR_16019_CANNOT_ADD_SC, entry.getDn().getName(), schemaName );
-            LOG.warn( msg );
+            
+            if ( LOG.isWarnEnabled() )
+            {
+                LOG.warn( msg );
+            }
+            
             throw new LdapUnwillingToPerformException( ResultCodeEnum.UNWILLING_TO_PERFORM, msg );
         }
 
@@ -364,8 +399,11 @@ public class SchemaEntityFactory implements EntityFactory
         if ( schema == null )
         {
             // The schema is disabled. We still have to update the backend
-            String msg = I18n.err( I18n.ERR_16020_CANNOT_ADD_SC_IN_REGISTRY, entry.getDn().getName(), schemaName );
-            LOG.info( msg );
+            if ( LOG.isInfoEnabled() )
+            {
+                LOG.info( I18n.err( I18n.ERR_16020_CANNOT_ADD_SC_IN_REGISTRY, entry.getDn().getName(), schemaName ) );
+            }
+            
             schema = schemaManager.getLoadedSchema( schemaName );
         }
 
@@ -413,7 +451,12 @@ public class SchemaEntityFactory implements EntityFactory
         {
             // The schema is not loaded. We can't create the requested SyntaxChecker
             String msg = I18n.err( I18n.ERR_16019_CANNOT_ADD_SC, syntaxCheckerDescription.getName(), schemaName );
-            LOG.warn( msg );
+            
+            if ( LOG.isWarnEnabled() )
+            {
+                LOG.warn( msg );
+            }
+            
             throw new LdapUnwillingToPerformException( ResultCodeEnum.UNWILLING_TO_PERFORM, msg );
         }
 
@@ -569,7 +612,12 @@ public class SchemaEntityFactory implements EntityFactory
         {
             // The schema is not loaded. We can't create the requested Comparator
             String msg = I18n.err( I18n.ERR_16022_CANNOT_ADD_CMP, comparatorDescription.getName(), schemaName );
-            LOG.warn( msg );
+            
+            if ( LOG.isWarnEnabled() )
+            {
+                LOG.warn( msg );
+            }
+            
             throw new LdapUnwillingToPerformException( ResultCodeEnum.UNWILLING_TO_PERFORM, msg );
         }
 
@@ -606,7 +654,12 @@ public class SchemaEntityFactory implements EntityFactory
         {
             // The schema is not loaded. We can't create the requested Comparator
             String msg = I18n.err( I18n.ERR_16022_CANNOT_ADD_CMP, entry.getDn().getName(), schemaName );
-            LOG.warn( msg );
+            
+            if ( LOG.isWarnEnabled() )
+            {
+                LOG.warn( msg );
+            }
+            
             throw new LdapUnwillingToPerformException( ResultCodeEnum.UNWILLING_TO_PERFORM, msg );
         }
 
@@ -615,8 +668,11 @@ public class SchemaEntityFactory implements EntityFactory
         if ( schema == null )
         {
             // The schema is disabled. We still have to update the backend
-            String msg = I18n.err( I18n.ERR_16023_CANNOT_ADD_CMP_IN_REGISTRY, entry.getDn().getName(), schemaName );
-            LOG.info( msg );
+            if ( LOG.isInfoEnabled() )
+            {
+                LOG.info( I18n.err( I18n.ERR_16023_CANNOT_ADD_CMP_IN_REGISTRY, entry.getDn().getName(), schemaName ) );
+            }
+            
             schema = schemaManager.getLoadedSchema( schemaName );
         }
 
@@ -733,7 +789,12 @@ public class SchemaEntityFactory implements EntityFactory
         {
             // The schema is not loaded. We can't create the requested Normalizer
             String msg = I18n.err( I18n.ERR_16024_CANNOT_ADD_NORMALIZER, normalizerDescription.getName(), schemaName );
-            LOG.warn( msg );
+            
+            if ( LOG.isWarnEnabled() )
+            {
+                LOG.warn( msg );
+            }
+            
             throw new LdapUnwillingToPerformException( ResultCodeEnum.UNWILLING_TO_PERFORM, msg );
         }
 
@@ -770,7 +831,12 @@ public class SchemaEntityFactory implements EntityFactory
         {
             // The schema is not loaded. We can't create the requested Normalizer
             String msg = I18n.err( I18n.ERR_16024_CANNOT_ADD_NORMALIZER, entry.getDn().getName(), schemaName );
-            LOG.warn( msg );
+            
+            if ( LOG.isWarnEnabled() )
+            {
+                LOG.warn( msg );
+            }
+            
             throw new LdapUnwillingToPerformException( ResultCodeEnum.UNWILLING_TO_PERFORM, msg );
         }
 
@@ -779,8 +845,11 @@ public class SchemaEntityFactory implements EntityFactory
         if ( schema == null )
         {
             // The schema is disabled. We still have to update the backend
-            String msg = I18n.err( I18n.ERR_16025_CANNOT_ADD_NORMALIZER_IN_REGISTRY, entry.getDn().getName(), schemaName );
-            LOG.info( msg );
+            if ( LOG.isInfoEnabled() )
+            {
+                LOG.info( I18n.err( I18n.ERR_16025_CANNOT_ADD_NORMALIZER_IN_REGISTRY, entry.getDn().getName(), schemaName ) );
+            }
+            
             schema = schemaManager.getLoadedSchema( schemaName );
         }
 
@@ -827,7 +896,12 @@ public class SchemaEntityFactory implements EntityFactory
         {
             // The schema is not loaded. We can't create the requested Syntax
             String msg = I18n.err( I18n.ERR_16026_CANNOT_ADD_SYNTAX, entry.getDn().getName(), schemaName );
-            LOG.warn( msg );
+            
+            if ( LOG.isWarnEnabled() )
+            {
+                LOG.warn( msg );
+            }
+            
             throw new LdapUnwillingToPerformException( ResultCodeEnum.UNWILLING_TO_PERFORM, msg );
         }
 
@@ -836,8 +910,11 @@ public class SchemaEntityFactory implements EntityFactory
         if ( schema == null )
         {
             // The schema is disabled. We still have to update the backend
-            String msg = I18n.err( I18n.ERR_16027_CANNOT_ADD_SYNTAX_IN_REGISTRY, entry.getDn().getName(), schemaName );
-            LOG.info( msg );
+            if ( LOG.isInfoEnabled() )
+            {
+                LOG.info( I18n.err( I18n.ERR_16027_CANNOT_ADD_SYNTAX_IN_REGISTRY, entry.getDn().getName(), schemaName ) );
+            }
+            
             schema = schemaManager.getLoadedSchema( schemaName );
         }
 
@@ -870,7 +947,12 @@ public class SchemaEntityFactory implements EntityFactory
         {
             // The schema is not loaded. We can't create the requested MatchingRule
             String msg = I18n.err( I18n.ERR_16028_CANNOT_ADD_MR, entry.getDn().getName(), schemaName );
-            LOG.warn( msg );
+            
+            if ( LOG.isWarnEnabled() )
+            {
+                LOG.warn( msg );
+            }
+            
             throw new LdapUnwillingToPerformException( ResultCodeEnum.UNWILLING_TO_PERFORM, msg );
         }
 
@@ -879,8 +961,11 @@ public class SchemaEntityFactory implements EntityFactory
         if ( schema == null )
         {
             // The schema is disabled. We still have to update the backend
-            String msg = I18n.err( I18n.ERR_16029_CANNOT_ADD_MR_IN_REGISTRY, entry.getDn().getName(), schemaName );
-            LOG.info( msg );
+            if ( LOG.isInfoEnabled() )
+            {
+                LOG.info( I18n.err( I18n.ERR_16029_CANNOT_ADD_MR_IN_REGISTRY, entry.getDn().getName(), schemaName ) );
+            }
+            
             schema = schemaManager.getLoadedSchema( schemaName );
         }
 
@@ -942,7 +1027,12 @@ public class SchemaEntityFactory implements EntityFactory
         {
             // The schema is not loaded. We can't create the requested ObjectClass
             String msg = I18n.err( I18n.ERR_16030_CANNOT_ADD_OC, entry.getDn().getName(), schemaName );
-            LOG.warn( msg );
+            
+            if ( LOG.isWarnEnabled() )
+            {
+                LOG.warn( msg );
+            }
+            
             throw new LdapUnwillingToPerformException( ResultCodeEnum.UNWILLING_TO_PERFORM, msg );
         }
 
@@ -951,8 +1041,11 @@ public class SchemaEntityFactory implements EntityFactory
         if ( schema == null )
         {
             // The schema is disabled. We still have to update the backend
-            String msg = I18n.err( I18n.ERR_16031_CANNOT_ADD_OC_IN_REGISTRY, entry.getDn().getName(), schemaName );
-            LOG.info( msg );
+            if ( LOG.isInfoEnabled() )
+            {
+                LOG.info( I18n.err( I18n.ERR_16031_CANNOT_ADD_OC_IN_REGISTRY, entry.getDn().getName(), schemaName ) );
+            }
+            
             schema = schemaManager.getLoadedSchema( schemaName );
         }
 
@@ -1018,7 +1111,12 @@ public class SchemaEntityFactory implements EntityFactory
         {
             // The schema is not loaded, this is an error
             String msg = I18n.err( I18n.ERR_16032_CANNOT_ADD_AT, entry.getDn().getName(), schemaName );
-            LOG.warn( msg );
+            
+            if ( LOG.isWarnEnabled() )
+            {
+                LOG.warn( msg );
+            }
+            
             throw new LdapUnwillingToPerformException( ResultCodeEnum.UNWILLING_TO_PERFORM, msg );
         }
 
@@ -1027,8 +1125,11 @@ public class SchemaEntityFactory implements EntityFactory
         if ( schema == null )
         {
             // The schema is disabled. We still have to update the backend
-            String msg = I18n.err( I18n.ERR_16033_CANNOT_ADD_AT_IN_REGISTRY, entry.getDn().getName(), schemaName );
-            LOG.info( msg );
+            if ( LOG.isInfoEnabled() )
+            {
+                LOG.info( I18n.err( I18n.ERR_16033_CANNOT_ADD_AT_IN_REGISTRY, entry.getDn().getName(), schemaName ) );
+            }
+            
             schema = schemaManager.getLoadedSchema( schemaName );
         }
 
@@ -1142,7 +1243,12 @@ public class SchemaEntityFactory implements EntityFactory
         if ( mFqcn == null )
         {
             String msg = I18n.err( I18n.ERR_16034_ENTRY_WITHOUT_VALID_AT, objectType, MetaSchemaConstants.M_FQCN_AT );
-            LOG.warn( msg );
+            
+            if ( LOG.isWarnEnabled() )
+            {
+                LOG.warn( msg );
+            }
+            
             throw new IllegalArgumentException( msg );
         }
 
@@ -1161,7 +1267,12 @@ public class SchemaEntityFactory implements EntityFactory
         if ( mFqcn == null )
         {
             String msg = I18n.err( I18n.ERR_16034_ENTRY_WITHOUT_VALID_AT, objectType, MetaSchemaConstants.M_FQCN_AT );
-            LOG.warn( msg );
+            
+            if ( LOG.isWarnEnabled() )
+            {
+                LOG.warn( msg );
+            }
+            
             throw new IllegalArgumentException( msg );
         }
 
@@ -1179,7 +1290,12 @@ public class SchemaEntityFactory implements EntityFactory
         if ( byteCodeString == null )
         {
             String msg = I18n.err( I18n.ERR_16034_ENTRY_WITHOUT_VALID_AT, objectType, MetaSchemaConstants.M_BYTECODE_AT );
-            LOG.warn( msg );
+            
+            if ( LOG.isWarnEnabled() )
+            {
+                LOG.warn( msg );
+            }
+            
             throw new IllegalArgumentException( msg );
         }
 
@@ -1286,7 +1402,11 @@ public class SchemaEntityFactory implements EntityFactory
 
             if ( !schema.getSchemaName().equalsIgnoreCase( schemaName ) )
             {
-                LOG.warn( I18n.msg( I18n.MSG_16011_SCHEMA_XSCHEMA_DIFF, schema.getSchemaName(), schemaName, entry ) );
+                
+                if ( LOG.isWarnEnabled() )
+                {
+                    LOG.warn( I18n.msg( I18n.MSG_16011_SCHEMA_XSCHEMA_DIFF, schema.getSchemaName(), schemaName, entry ) );
+                }
             }
 
             schemaObject.addExtension( MetaSchemaConstants.X_SCHEMA_AT, schemaName );
diff --git a/ldap/schema/data/src/main/java/org/apache/directory/api/ldap/schema/loader/SingleLdifSchemaLoader.java b/ldap/schema/data/src/main/java/org/apache/directory/api/ldap/schema/loader/SingleLdifSchemaLoader.java
index b40faf8..251fe32 100644
--- a/ldap/schema/data/src/main/java/org/apache/directory/api/ldap/schema/loader/SingleLdifSchemaLoader.java
+++ b/ldap/schema/data/src/main/java/org/apache/directory/api/ldap/schema/loader/SingleLdifSchemaLoader.java
@@ -80,7 +80,10 @@ public class SingleLdifSchemaLoader extends AbstractSchemaLoader
         {
             URL resource = getClass().getClassLoader().getResource( "schema-all.ldif" );
 
-            LOG.debug( I18n.msg( I18n.MSG_16012_URL_SCHEMA_ALL_LDIF, resource ) );
+            if ( LOG.isDebugEnabled() )
+            {
+                LOG.debug( I18n.msg( I18n.MSG_16012_URL_SCHEMA_ALL_LDIF, resource ) );
+            }
 
             for ( String s : schemaObjectTypeRdns )
             {
diff --git a/ldap/schema/data/src/main/java/org/apache/directory/api/ldap/schema/manager/impl/DefaultSchemaManager.java b/ldap/schema/data/src/main/java/org/apache/directory/api/ldap/schema/manager/impl/DefaultSchemaManager.java
index 890f085..6372018 100644
--- a/ldap/schema/data/src/main/java/org/apache/directory/api/ldap/schema/manager/impl/DefaultSchemaManager.java
+++ b/ldap/schema/data/src/main/java/org/apache/directory/api/ldap/schema/manager/impl/DefaultSchemaManager.java
@@ -750,7 +750,11 @@ public class DefaultSchemaManager implements SchemaManager
     {
         if ( schema == null )
         {
-            LOG.info( I18n.msg( I18n.MSG_16013_SCHEMA_IS_NULL ) );
+            if ( LOG.isInfoEnabled() )
+            {
+                LOG.info( I18n.msg( I18n.MSG_16013_SCHEMA_IS_NULL ) );
+            }
+            
             return false;
         }
 
@@ -764,7 +768,10 @@ public class DefaultSchemaManager implements SchemaManager
         {
             if ( registries.isDisabledAccepted() )
             {
-                LOG.info( I18n.msg( I18n.MSG_16014_LOADING_DISABLED_SCHEMA, schema.getSchemaName(), schema ) );
+                if ( LOG.isInfoEnabled() )
+                {
+                    LOG.info( I18n.msg( I18n.MSG_16014_LOADING_DISABLED_SCHEMA, schema.getSchemaName(), schema ) );
+                }
 
                 registries.schemaLoaded( schema );
                 addSchemaObjects( schema, registries );
@@ -776,7 +783,10 @@ public class DefaultSchemaManager implements SchemaManager
         }
         else
         {
-            LOG.info( I18n.msg( I18n.MSG_16015_LOADING_ENABLED_SCHEMA, schema.getSchemaName(), schema ) );
+            if ( LOG.isInfoEnabled() )
+            {
+                LOG.info( I18n.msg( I18n.MSG_16015_LOADING_ENABLED_SCHEMA, schema.getSchemaName(), schema ) );
+            }
 
             // Check that the dependencies, if any, are correct
             if ( schema.getDependencies() != null )
@@ -789,7 +799,12 @@ public class DefaultSchemaManager implements SchemaManager
                     {
                         // The dependency has not been loaded.
                         String msg = I18n.err( I18n.ERR_16035_CANNOT_LOAD_SCHEMA, schema.getSchemaName() );
-                        LOG.info( msg );
+                        
+                        if ( LOG.isInfoEnabled() )
+                        {
+                            LOG.info( msg );
+                        }
+                        
                         Throwable error = new LdapProtocolErrorException( msg );
                         errors.add( error );
 
@@ -828,7 +843,11 @@ public class DefaultSchemaManager implements SchemaManager
     {
         if ( schema == null )
         {
-            LOG.info( I18n.msg( I18n.MSG_16013_SCHEMA_IS_NULL )  );
+            if ( LOG.isInfoEnabled() )
+            {
+                LOG.info( I18n.msg( I18n.MSG_16013_SCHEMA_IS_NULL )  );
+            }
+            
             return false;
         }
 
@@ -840,7 +859,10 @@ public class DefaultSchemaManager implements SchemaManager
 
         if ( schema.isEnabled() )
         {
-            LOG.info( I18n.msg( I18n.MSG_16016_UNLOADING_SCHEMA, schema.getSchemaName(), schema ) );
+            if ( LOG.isInfoEnabled() )
+            {
+                LOG.info( I18n.msg( I18n.MSG_16016_UNLOADING_SCHEMA, schema.getSchemaName(), schema ) );
+            }
 
             deleteSchemaObjects( schema, registries );
             registries.schemaUnloaded( schema );
@@ -1282,13 +1304,21 @@ public class DefaultSchemaManager implements SchemaManager
     {
         if ( schema == null )
         {
-            LOG.info( I18n.msg( I18n.MSG_16013_SCHEMA_IS_NULL )  );
+            if ( LOG.isInfoEnabled() )
+            {
+                LOG.info( I18n.msg( I18n.MSG_16013_SCHEMA_IS_NULL )  );
+            }
+            
             return;
         }
 
         if ( schema.isDisabled() && !registries.isDisabledAccepted() )
         {
-            LOG.info( I18n.msg( I18n.MSG_16017_UNACCEPTED_DISABLED_SCHEMA ) );
+            if ( LOG.isInfoEnabled() )
+            {
+                LOG.info( I18n.msg( I18n.MSG_16017_UNACCEPTED_DISABLED_SCHEMA ) );
+            }
+            
             return;
         }
 
@@ -1296,7 +1326,11 @@ public class DefaultSchemaManager implements SchemaManager
 
         if ( registries.isSchemaLoaded( schemaName ) )
         {
-            LOG.info( I18n.msg( I18n.MSG_16018_SCHEMA_ALREADY_LOADED, schema.getSchemaName() ) );
+            if ( LOG.isInfoEnabled() )
+            {
+                LOG.info( I18n.msg( I18n.MSG_16018_SCHEMA_ALREADY_LOADED, schema.getSchemaName() ) );
+            }
+            
             return;
         }
 
@@ -1382,13 +1416,21 @@ public class DefaultSchemaManager implements SchemaManager
     {
         if ( schema == null )
         {
-            LOG.info( I18n.msg( I18n.MSG_16013_SCHEMA_IS_NULL )  );
+            if ( LOG.isInfoEnabled() )
+            {
+                LOG.info( I18n.msg( I18n.MSG_16013_SCHEMA_IS_NULL )  );
+            }
+            
             return;
         }
 
         if ( schema.isDisabled() && !registries.isDisabledAccepted() )
         {
-            LOG.info( I18n.msg( I18n.MSG_16017_UNACCEPTED_DISABLED_SCHEMA ) );
+            if ( LOG.isInfoEnabled() )
+            {
+                LOG.info( I18n.msg( I18n.MSG_16017_UNACCEPTED_DISABLED_SCHEMA ) );
+            }
+            
             return;
         }
 
@@ -1396,7 +1438,11 @@ public class DefaultSchemaManager implements SchemaManager
 
         if ( registries.isSchemaLoaded( schemaName ) )
         {
-            LOG.info( I18n.msg( I18n.MSG_16018_SCHEMA_ALREADY_LOADED, schema.getSchemaName() ) );
+            if ( LOG.isInfoEnabled() )
+            {
+                LOG.info( I18n.msg( I18n.MSG_16018_SCHEMA_ALREADY_LOADED, schema.getSchemaName() ) );
+            }
+            
             return;
         }
 
@@ -1996,7 +2042,12 @@ public class DefaultSchemaManager implements SchemaManager
             {
                 // The SchemaObject must be associated with an existing schema
                 String msg = I18n.err( I18n.ERR_16038_NOT_ASSOCIATED_TO_A_SCHEMA, copy.getOid() );
-                LOG.info( msg );
+                
+                if ( LOG.isInfoEnabled() )
+                {
+                    LOG.info( msg );
+                }
+                
                 Throwable error = new LdapProtocolErrorException( msg );
                 errors.add( error );
                 return false;
@@ -2031,15 +2082,21 @@ public class DefaultSchemaManager implements SchemaManager
                     // Apply the addition to the real registries
                     registries.add( errors, copy, true );
 
-                    LOG.debug( I18n.msg( I18n.MSG_16019_ENABLED_SCHEMA_ADDED, copy.getName(), schemaName ) );
+                    if ( LOG.isDebugEnabled() )
+                    {
+                        LOG.debug( I18n.msg( I18n.MSG_16019_ENABLED_SCHEMA_ADDED, copy.getName(), schemaName ) );
+                    }
 
                     return true;
                 }
                 else
                 {
                     // We have some error : reject the addition and get out
-                    LOG.info( I18n.msg( I18n.MSG_16020_CANNOT_LOAD_SCHEMAOBJECT, 
-                        copy.getOid(), Strings.listToString( errors ) ) );
+                    if ( LOG.isInfoEnabled() )
+                    {
+                        LOG.info( I18n.msg( I18n.MSG_16020_CANNOT_LOAD_SCHEMAOBJECT, 
+                            copy.getOid(), Strings.listToString( errors ) ) );
+                    }
 
                     return false;
                 }
@@ -2050,7 +2107,11 @@ public class DefaultSchemaManager implements SchemaManager
                 // schema
                 registries.associateWithSchema( errors, copy );
 
-                LOG.debug( I18n.msg( I18n.MSG_16021_ADDED_INTO_DISABLED_SCHEMA, copy.getName(), schemaName ) );
+                if ( LOG.isDebugEnabled() )
+                {
+                    LOG.debug( I18n.msg( I18n.MSG_16021_ADDED_INTO_DISABLED_SCHEMA, copy.getName(), schemaName ) );
+                }
+                
                 return errors.isEmpty();
             }
         }
@@ -2111,7 +2172,12 @@ public class DefaultSchemaManager implements SchemaManager
             {
                 // The SchemaObject must be associated with an existing schema
                 String msg = I18n.err( I18n.ERR_16041_CANNOT_DELETE_SCHEMA_OBJECT, schemaObject.getOid() );
-                LOG.info( msg );
+
+                if ( LOG.isInfoEnabled() )
+                {
+                    LOG.info( msg );
+                }
+                
                 Throwable error = new LdapProtocolErrorException( msg );
                 errors.add( error );
                 return false;
@@ -2143,15 +2209,21 @@ public class DefaultSchemaManager implements SchemaManager
                     // Apply the deletion to the real registries
                     registries.delete( errors, toDelete );
 
-                    LOG.debug( I18n.msg( I18n.MSG_16022_REMOVED_FROM_ENABLED_SCHEMA, toDelete.getName(), schemaName ) );
+                    if ( LOG.isDebugEnabled() )
+                    {
+                        LOG.debug( I18n.msg( I18n.MSG_16022_REMOVED_FROM_ENABLED_SCHEMA, toDelete.getName(), schemaName ) );
+                    }
 
                     return true;
                 }
                 else
                 {
                     // We have some error : reject the deletion and get out
-                    LOG.info( I18n.msg( I18n.MSG_16023_CANNOT_DELETE_SCHEMAOBJECT, 
-                        schemaObject.getOid(), Strings.listToString( errors ) ) );
+                    if ( LOG.isInfoEnabled() )
+                    {
+                        LOG.info( I18n.msg( I18n.MSG_16023_CANNOT_DELETE_SCHEMAOBJECT, 
+                            schemaObject.getOid(), Strings.listToString( errors ) ) );
+                    }
 
                     return false;
                 }
@@ -2162,7 +2234,10 @@ public class DefaultSchemaManager implements SchemaManager
                 // schema
                 registries.associateWithSchema( errors, schemaObject );
 
-                LOG.debug( I18n.msg( I18n.MSG_16024_REMOVED_FROM_DISABLED_SCHEMA, schemaObject.getName(), schemaName ) );
+                if ( LOG.isDebugEnabled() )
+                {
+                    LOG.debug( I18n.msg( I18n.MSG_16024_REMOVED_FROM_DISABLED_SCHEMA, schemaObject.getName(), schemaName ) );
+                }
                 
                 return errors.isEmpty();
             }
diff --git a/util/src/main/java/org/apache/directory/api/util/MethodUtils.java b/util/src/main/java/org/apache/directory/api/util/MethodUtils.java
index 5883b31..c35affd 100644
--- a/util/src/main/java/org/apache/directory/api/util/MethodUtils.java
+++ b/util/src/main/java/org/apache/directory/api/util/MethodUtils.java
@@ -78,7 +78,10 @@ public final class MethodUtils
                 buf.append( argClass.getName() );
             }
 
-            LOG.debug( buf.toString() );
+            if ( LOG.isDebugEnabled() )
+            {
+                LOG.debug( buf.toString() );
+            }
         }
 
         try
@@ -93,7 +96,10 @@ public final class MethodUtils
         }
         catch ( Exception e )
         {
-            LOG.info( I18n.msg( I18n.MSG_17009_NO_EXACT_MATCH, candidateMethodName, e ) );
+            if ( LOG.isInfoEnabled() )
+            {
+                LOG.info( I18n.msg( I18n.MSG_17009_NO_EXACT_MATCH, candidateMethodName, e ) );
+            }
         }
 
         /**
diff --git a/util/src/main/java/org/apache/directory/api/util/OsgiUtils.java b/util/src/main/java/org/apache/directory/api/util/OsgiUtils.java
index cd0698f..e796353 100644
--- a/util/src/main/java/org/apache/directory/api/util/OsgiUtils.java
+++ b/util/src/main/java/org/apache/directory/api/util/OsgiUtils.java
@@ -73,11 +73,19 @@ public final class OsgiUtils
 
             if ( exports == null )
             {
-                LOG.debug( I18n.msg( I18n.MSG_17000_NO_EXPORT_FOUND, candidate ) );
+                if ( LOG.isDebugEnabled() )
+                {
+                    LOG.debug( I18n.msg( I18n.MSG_17000_NO_EXPORT_FOUND, candidate ) );
+                }
+                
                 continue;
             }
 
-            LOG.debug( I18n.msg( I18n.MSG_17001_PROCESSING_EXPORTS, candidate, exports ) );
+            if ( LOG.isDebugEnabled() )
+            {
+                LOG.debug( I18n.msg( I18n.MSG_17001_PROCESSING_EXPORTS, candidate, exports ) );
+            }
+            
             splitIntoPackages( exports, pkgs );
         }
 
@@ -118,7 +126,12 @@ public final class OsgiUtils
                 inProps = true;
 
                 pkgs.add( pkg.toString() );
-                LOG.debug( I18n.msg( I18n.MSG_17002_ADDED_PACKAGE, pkg.toString() ) );
+
+                if ( LOG.isDebugEnabled() )
+                {
+                    LOG.debug( I18n.msg( I18n.MSG_17002_ADDED_PACKAGE, pkg.toString() ) );
+                }
+                
                 pkg.setLength( 0 );
 
                 index += 8;
@@ -167,16 +180,27 @@ public final class OsgiUtils
                 if ( filter != null && filter.accept( candidate ) )
                 {
                     candidates.add( candidate );
-                    LOG.info( I18n.msg( I18n.MSG_17003_ACCEPTED_CANDIDATE_WITH_FILTER, candidate.toString() ) );
+
+                    if ( LOG.isInfoEnabled() )
+                    {
+                        LOG.info( I18n.msg( I18n.MSG_17003_ACCEPTED_CANDIDATE_WITH_FILTER, candidate.toString() ) );
+                    }
                 }
                 else if ( filter == null && candidate.getName().endsWith( ".jar" ) )
                 {
                     candidates.add( candidate );
-                    LOG.info( I18n.msg( I18n.MSG_17004_ACCEPTED_CANDIDATE_NO_FILTER, candidate.toString() ) );
+                    
+                    if ( LOG.isInfoEnabled() )
+                    {
+                        LOG.info( I18n.msg( I18n.MSG_17004_ACCEPTED_CANDIDATE_NO_FILTER, candidate.toString() ) );
+                    }
                 }
                 else
                 {
-                    LOG.info( I18n.msg( I18n.MSG_17005_REJECTING_CANDIDATE, candidate.toString() ) );
+                    if ( LOG.isInfoEnabled() )
+                    {
+                        LOG.info( I18n.msg( I18n.MSG_17005_REJECTING_CANDIDATE, candidate.toString() ) );
+                    }
                 }
             }
         }
diff --git a/util/src/main/java/org/apache/directory/api/util/Strings.java b/util/src/main/java/org/apache/directory/api/util/Strings.java
index 0887744..06187c7 100644
--- a/util/src/main/java/org/apache/directory/api/util/Strings.java
+++ b/util/src/main/java/org/apache/directory/api/util/Strings.java
@@ -2196,11 +2196,19 @@ public final class Strings
             && isHex( uuid.charAt( 33 ) ) && isHex( uuid.charAt( 34 ) ) && isHex( uuid.charAt( 35 ) ) )
         {
             // There is not that much more we can check.
-            LOG.debug( I18n.msg( I18n.MSG_17007_SYNTAX_VALID, uuid ) );
+            if ( LOG.isDebugEnabled() )
+            {
+                LOG.debug( I18n.msg( I18n.MSG_17007_SYNTAX_VALID, uuid ) );
+            }
+            
             return true;
         }
 
-        LOG.debug( I18n.msg( I18n.MSG_17008_SYNTAX_INVALID, uuid ) );
+        if ( LOG.isDebugEnabled() )
+        {
+            LOG.debug( I18n.msg( I18n.MSG_17008_SYNTAX_INVALID, uuid ) );
+        }
+        
         return false;
     }
 

-- 
To stop receiving notification emails like this one, please contact
elecharny@apache.org.

Mime
View raw message