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/ServerDescriptor.java | 20 ++++++++++----------
1 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/opendj3-server-dev/src/ads/org/opends/admin/ads/ServerDescriptor.java b/opendj3-server-dev/src/ads/org/opends/admin/ads/ServerDescriptor.java
index b2a0bd9..4f75777 100644
--- a/opendj3-server-dev/src/ads/org/opends/admin/ads/ServerDescriptor.java
+++ b/opendj3-server-dev/src/ads/org/opends/admin/ads/ServerDescriptor.java
@@ -22,7 +22,7 @@
*
*
* Copyright 2007-2010 Sun Microsystems, Inc.
- * Portion Copyright 2013 ForgeRock AS.
+ * Portion Copyright 2013-2014 ForgeRock AS.
*/
package org.opends.admin.ads;
@@ -34,8 +34,9 @@
import java.util.List;
import java.util.Map;
import java.util.Set;
-import java.util.logging.Level;
-import java.util.logging.Logger;
+
+import org.forgerock.i18n.LocalizableMessage;
+import org.forgerock.i18n.slf4j.LocalizedLogger;
import javax.naming.NameNotFoundException;
import javax.naming.NamingEnumeration;
@@ -66,8 +67,7 @@
private static final String TRUSTSTORE_DN = "cn=ads-truststore";
- private static final Logger LOG =
- Logger.getLogger(ServerDescriptor.class.getName());
+ private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass();
/**
* Enumeration containing the different server properties that we can keep in
@@ -566,15 +566,15 @@
}
catch (Throwable t)
{
- LOG.log(Level.WARNING, "Error calculating host port: "+t+" in "+
- adsProperties, t);
+ logger.warn(LocalizableMessage.raw("Error calculating host port: "+t+" in "+
+ adsProperties, t));
}
break;
}
else
{
- LOG.log(Level.WARNING, "Value for "+portProp+" is null in "+
- adsProperties);
+ logger.warn(LocalizableMessage.raw("Value for "+portProp+" is null in "+
+ adsProperties));
}
}
}
@@ -1450,7 +1450,7 @@
catch (NameNotFoundException nnfe)
{
// Ignore
- LOG.log(Level.WARNING, "Error cleaning truststore: "+nnfe, nnfe);
+ logger.warn(LocalizableMessage.raw("Error cleaning truststore: "+nnfe, nnfe));
}
}
--
Gitblit v1.10.0