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/tools/SSLConnectionFactory.java | 31 +++++++------------------------
1 files changed, 7 insertions(+), 24 deletions(-)
diff --git a/opendj3-server-dev/src/server/org/opends/server/tools/SSLConnectionFactory.java b/opendj3-server-dev/src/server/org/opends/server/tools/SSLConnectionFactory.java
index cb2a074..1fbe688 100644
--- a/opendj3-server-dev/src/server/org/opends/server/tools/SSLConnectionFactory.java
+++ b/opendj3-server-dev/src/server/org/opends/server/tools/SSLConnectionFactory.java
@@ -22,7 +22,7 @@
*
*
* Copyright 2006-2008 Sun Microsystems, Inc.
- * Portions Copyright 2013 ForgeRock AS
+ * Portions Copyright 2013-2014 ForgeRock AS
*/
package org.opends.server.tools;
@@ -44,13 +44,11 @@
import javax.net.ssl.X509TrustManager;
import org.opends.server.extensions.BlindTrustManagerProvider;
-import org.opends.server.loggers.debug.DebugTracer;
-import org.opends.server.types.DebugLogLevel;
+import org.forgerock.i18n.slf4j.LocalizedLogger;
import org.opends.server.util.ExpirationCheckTrustManager;
import org.opends.server.util.SelectableCertificateKeyManager;
import static org.opends.messages.ToolMessages.*;
-import static org.opends.server.loggers.debug.DebugLogger.*;
/**
@@ -58,10 +56,7 @@
*/
public class SSLConnectionFactory
{
- /**
- * The tracer object for the debug logger.
- */
- private static final DebugTracer TRACER = getTracer();
+ private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass();
private SSLSocketFactory sslSocketFactory = null;
@@ -288,10 +283,7 @@
} catch(Exception e)
{
- if (debugEnabled())
- {
- TRACER.debugCaught(DebugLogLevel.ERROR, e);
- }
+ logger.traceException(e);
throw new SSLConnectionException(
ERR_TOOLS_CANNOT_LOAD_KEYSTORE_FILE.get(keyStoreFile), e);
@@ -307,10 +299,7 @@
return keyManagerFactory.getKeyManagers();
} catch(Exception ke)
{
- if (debugEnabled())
- {
- TRACER.debugCaught(DebugLogLevel.ERROR, ke);
- }
+ logger.traceException(ke);
throw new SSLConnectionException(
ERR_TOOLS_CANNOT_INIT_KEYMANAGER.get(keyStoreFile), ke);
@@ -382,10 +371,7 @@
inputStream.close();
} catch(Exception e)
{
- if (debugEnabled())
- {
- TRACER.debugCaught(DebugLogLevel.ERROR, e);
- }
+ logger.traceException(e);
throw new SSLConnectionException(
ERR_TOOLS_CANNOT_LOAD_TRUSTSTORE_FILE.get(trustStoreFile), e);
@@ -401,10 +387,7 @@
return trustManagerFactory.getTrustManagers();
} catch(Exception ke)
{
- if (debugEnabled())
- {
- TRACER.debugCaught(DebugLogLevel.ERROR, ke);
- }
+ logger.traceException(ke);
throw new SSLConnectionException(
ERR_TOOLS_CANNOT_INIT_TRUSTMANAGER.get(trustStoreFile), ke);
--
Gitblit v1.10.0