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/util/cli/LDAPConnectionConsoleInteraction.java | 22 +++++++++++-----------
1 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/opendj3-server-dev/src/server/org/opends/server/util/cli/LDAPConnectionConsoleInteraction.java b/opendj3-server-dev/src/server/org/opends/server/util/cli/LDAPConnectionConsoleInteraction.java
index e9516b1..49e881f 100644
--- a/opendj3-server-dev/src/server/org/opends/server/util/cli/LDAPConnectionConsoleInteraction.java
+++ b/opendj3-server-dev/src/server/org/opends/server/util/cli/LDAPConnectionConsoleInteraction.java
@@ -59,8 +59,8 @@
import java.security.cert.X509Certificate;
import java.util.Enumeration;
import java.util.LinkedHashMap;
-import java.util.logging.Level;
-import java.util.logging.Logger;
+
+import org.forgerock.i18n.slf4j.LocalizedLogger;
/**
* Supports interacting with a user through the command line to
@@ -1765,7 +1765,7 @@
*/
public boolean promptForCertificateConfirmation(Throwable t,
ApplicationTrustManager usedTrustManager, String usedUrl,
- boolean displayErrorMessage, Logger logger)
+ boolean displayErrorMessage, LocalizedLogger logger)
{
boolean returnValue = false;
ApplicationTrustManager.Cause cause;
@@ -1779,7 +1779,7 @@
}
if (logger != null)
{
- logger.log(Level.INFO, "Certificate exception cause: "+cause);
+ logger.debug(LocalizableMessage.raw("Certificate exception cause: "+cause));
}
UserDataCertificateException.Type excType = null;
if (cause == ApplicationTrustManager.Cause.NOT_TRUSTED)
@@ -1812,7 +1812,7 @@
{
if (logger != null)
{
- logger.log(Level.WARNING, "Error parsing ldap url of ldap url.", t1);
+ logger.warn(LocalizableMessage.raw("Error parsing ldap url of ldap url.", t1));
}
h = INFO_NOT_AVAILABLE_LABEL.get().toString();
p = -1;
@@ -1850,18 +1850,18 @@
{
if (chain == null)
{
- logger.log(Level.WARNING,
- "The chain is null for the UserDataCertificateException");
+ logger.warn(LocalizableMessage.raw(
+ "The chain is null for the UserDataCertificateException"));
}
if (authType == null)
{
- logger.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)
{
- logger.log(Level.WARNING,
- "The host is null for the UserDataCertificateException");
+ logger.warn(LocalizableMessage.raw(
+ "The host is null for the UserDataCertificateException"));
}
}
if (chain != null)
--
Gitblit v1.10.0