From 1d5d1a6a4a0a58d6bb4803527dacb6641c027816 Mon Sep 17 00:00:00 2001
From: Nicolas Capponi <nicolas.capponi@forgerock.com>
Date: Tue, 28 Jan 2014 13:34:12 +0000
Subject: [PATCH] Checkpoint commit for OPENDJ-1288 : Migrate I18n and logging support to i18n framework and SLF4J
---
opendj3-server-dev/src/server/org/opends/server/schema/CertificateExactMatchingRule.java | 31 +++++++------------------------
1 files changed, 7 insertions(+), 24 deletions(-)
diff --git a/opendj3-server-dev/src/server/org/opends/server/schema/CertificateExactMatchingRule.java b/opendj3-server-dev/src/server/org/opends/server/schema/CertificateExactMatchingRule.java
index 9dede52..61fa4ce 100644
--- a/opendj3-server-dev/src/server/org/opends/server/schema/CertificateExactMatchingRule.java
+++ b/opendj3-server-dev/src/server/org/opends/server/schema/CertificateExactMatchingRule.java
@@ -36,7 +36,6 @@
import java.security.cert.CertificateFactory;
import java.security.cert.X509Certificate;
import javax.security.auth.x500.X500Principal;
-import static org.opends.server.loggers.debug.DebugLogger.*;
import static org.opends.messages.SchemaMessages.*;
import static org.opends.server.schema.SchemaConstants.*;
import static org.opends.server.util.StaticUtils.*;
@@ -48,14 +47,13 @@
import org.opends.server.api.EqualityMatchingRule;
import org.opends.server.core.DirectoryServer;
import org.opends.server.loggers.ErrorLogger;
-import org.opends.server.loggers.debug.DebugTracer;
+import org.forgerock.i18n.slf4j.LocalizedLogger;
import org.opends.server.protocols.asn1.GSERException;
import org.opends.server.protocols.asn1.GSERParser;
import org.forgerock.opendj.ldap.ByteSequence;
import org.forgerock.opendj.ldap.ByteString;
import org.forgerock.opendj.ldap.ByteStringBuilder;
import org.opends.server.types.DN;
-import org.opends.server.types.DebugLogLevel;
import org.opends.server.types.DirectoryException;
import org.opends.server.types.ResultCode;
import org.opends.server.util.StaticUtils;
@@ -87,13 +85,7 @@
* The GSER identifier for the rdnSequence IdentifiedChoiceValue.
*/
private static final String GSER_ID_RDNSEQUENCE = "rdnSequence";
-
-
-
- /**
- * The tracer object for the debug logger.
- */
- private static final DebugTracer TRACER = getTracer();
+ private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass();
@@ -203,9 +195,9 @@
{
// There seems to be a problem while parsing the certificate.
LocalizableMessage message = WARN_CERTIFICATE_MATCH_PARSE_ERROR.get(ce.getMessage());
- if (debugEnabled())
+ if (logger.isTraceEnabled())
{
- TRACER.debugWarning(message.toString());
+ logger.trace(message.toString());
}
// return the raw bytes as a fall back
@@ -220,10 +212,7 @@
}
catch (Exception e)
{
- if (debugEnabled())
- {
- TRACER.debugCaught(DebugLogLevel.ERROR, e);
- }
+ logger.traceException(e);
// We couldn't normalize the DN for some reason. If we're supposed to use
// strict syntax enforcement, then throw an exception. Otherwise, log a
@@ -278,10 +267,7 @@
}
catch (Exception e)
{
- if (debugEnabled())
- {
- TRACER.debugCaught(DebugLogLevel.ERROR, e);
- }
+ logger.traceException(e);
// Assume the assertion value is a certificate and parse issuer and serial
// number. If the value is not even a certificate then the raw bytes will
// be returned.
@@ -363,10 +349,7 @@
}
catch (Exception e)
{
- if (debugEnabled())
- {
- TRACER.debugCaught(DebugLogLevel.ERROR, e);
- }
+ logger.traceException(e);
// We couldn't normalize the DN for some reason. If we're supposed to use
// strict syntax enforcement, then throw an exception. Otherwise, log a
--
Gitblit v1.10.0