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/quicksetup/org/opends/quicksetup/ui/GuiApplication.java | 23 +++++++++++------------
1 files changed, 11 insertions(+), 12 deletions(-)
diff --git a/opendj3-server-dev/src/quicksetup/org/opends/quicksetup/ui/GuiApplication.java b/opendj3-server-dev/src/quicksetup/org/opends/quicksetup/ui/GuiApplication.java
index d75c29f..ddc8d5a 100644
--- a/opendj3-server-dev/src/quicksetup/org/opends/quicksetup/ui/GuiApplication.java
+++ b/opendj3-server-dev/src/quicksetup/org/opends/quicksetup/ui/GuiApplication.java
@@ -44,8 +44,8 @@
import java.security.cert.X509Certificate;
import java.util.LinkedHashSet;
import java.util.Set;
-import java.util.logging.Level;
-import java.util.logging.Logger;
+
+import org.forgerock.i18n.slf4j.LocalizedLogger;
/**
* This class represents an application with a wizard GUI that can be run in the
@@ -54,8 +54,7 @@
*/
public abstract class GuiApplication extends Application {
- static private final Logger LOG =
- Logger.getLogger(GuiApplication.class.getName());
+ private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass();
/** The currently displayed wizard step. */
private WizardStep displayedStep;
@@ -432,25 +431,25 @@
if ((chain != null) && (authType != null) && (host != null))
{
- LOG.log(Level.INFO, "Accepting certificate presented by host "+host);
+ logger.debug(LocalizableMessage.raw("Accepting certificate presented by host "+host));
getTrustManager().acceptCertificate(chain, authType, host);
}
else
{
if (chain == null)
{
- LOG.log(Level.WARNING,
- "The chain is null for the UserDataCertificateException");
+ logger.warn(LocalizableMessage.raw(
+ "The chain is null for the UserDataCertificateException"));
}
if (authType == null)
{
- LOG.log(Level.WARNING,
- "The auth type is null for the UserDataCertificateException");
+ logger.warn(LocalizableMessage.raw(
+ "The auth type is null for the UserDataCertificateException"));
}
if (host == null)
{
- LOG.log(Level.WARNING,
- "The host is null for the UserDataCertificateException");
+ logger.warn(LocalizableMessage.raw(
+ "The host is null for the UserDataCertificateException"));
}
}
if (acceptPermanently)
@@ -463,7 +462,7 @@
}
catch (Throwable t)
{
- LOG.log(Level.WARNING, "Error accepting certificate: "+t, t);
+ logger.warn(LocalizableMessage.raw("Error accepting certificate: "+t, t));
}
}
}
--
Gitblit v1.10.0