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/ads/org/opends/admin/ads/util/ApplicationKeyManager.java | 17 +++++++++--------
1 files changed, 9 insertions(+), 8 deletions(-)
diff --git a/opendj3-server-dev/src/ads/org/opends/admin/ads/util/ApplicationKeyManager.java b/opendj3-server-dev/src/ads/org/opends/admin/ads/util/ApplicationKeyManager.java
index d777863..d634277 100644
--- a/opendj3-server-dev/src/ads/org/opends/admin/ads/util/ApplicationKeyManager.java
+++ b/opendj3-server-dev/src/ads/org/opends/admin/ads/util/ApplicationKeyManager.java
@@ -23,6 +23,7 @@
*
* Copyright 2008-2009 Sun Microsystems, Inc.
* Portions Copyright 2009 Parametric Technology Corporation (PTC)
+ * Portions Copyright 2014 ForgeRock AS
*/
package org.opends.admin.ads.util;
@@ -36,8 +37,9 @@
import java.security.PrivateKey;
import java.security.UnrecoverableKeyException;
import java.security.cert.X509Certificate;
-import java.util.logging.Level;
-import java.util.logging.Logger;
+
+import org.forgerock.i18n.LocalizableMessage;
+import org.forgerock.i18n.slf4j.LocalizedLogger;
import javax.net.ssl.KeyManager;
import javax.net.ssl.KeyManagerFactory;
@@ -61,8 +63,7 @@
*/
public class ApplicationKeyManager implements X509KeyManager
{
- static private final Logger LOG =
- Logger.getLogger(ApplicationKeyManager.class.getName());
+ private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass();
/**
* The default keyManager.
@@ -145,25 +146,25 @@
{
// Nothing to do. Maybe we should avoid this and be strict, but we are
// in a best effor mode.
- LOG.log(Level.WARNING, "Error with the algorithm", e);
+ logger.warn(LocalizableMessage.raw("Error with the algorithm", e));
}
catch (KeyStoreException e)
{
// Nothing to do. Maybe we should avoid this and be strict, but we are
// in a best effor mode..
- LOG.log(Level.WARNING, "Error with the keystore", e);
+ logger.warn(LocalizableMessage.raw("Error with the keystore", e));
}
catch (UnrecoverableKeyException e)
{
// Nothing to do. Maybe we should avoid this and be strict, but we are
// in a best effor mode.
- LOG.log(Level.WARNING, "Error with the key", e);
+ logger.warn(LocalizableMessage.raw("Error with the key", e));
}
catch (NoSuchProviderException e)
{
// Nothing to do. Maybe we should avoid this and be strict, but we are
// in a best effor mode.
- LOG.log(Level.WARNING, "Error with the provider", e);
+ logger.warn(LocalizableMessage.raw("Error with the provider", e));
}
}
}
--
Gitblit v1.10.0