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/replication/protocol/ErrorMsg.java | 14 ++++++--------
1 files changed, 6 insertions(+), 8 deletions(-)
diff --git a/opendj3-server-dev/src/server/org/opends/server/replication/protocol/ErrorMsg.java b/opendj3-server-dev/src/server/org/opends/server/replication/protocol/ErrorMsg.java
index d88a057..f39b20d 100644
--- a/opendj3-server-dev/src/server/org/opends/server/replication/protocol/ErrorMsg.java
+++ b/opendj3-server-dev/src/server/org/opends/server/replication/protocol/ErrorMsg.java
@@ -27,14 +27,12 @@
package org.opends.server.replication.protocol;
import org.forgerock.i18n.LocalizableMessage;
-import static org.opends.server.loggers.debug.DebugLogger.debugEnabled;
-import static org.opends.server.loggers.debug.DebugLogger.getTracer;
import static org.opends.server.util.StaticUtils.stackTraceToSingleLineString;
import java.io.UnsupportedEncodingException;
import java.util.zip.DataFormatException;
-import org.opends.server.loggers.debug.DebugTracer;
+import org.forgerock.i18n.slf4j.LocalizedLogger;
/**
* This message is part of the replication protocol.
@@ -44,7 +42,7 @@
public class ErrorMsg extends RoutableMsg
{
// The tracer object for the debug logger
- private static final DebugTracer TRACER = getTracer();
+ private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass();
// Specifies the messageID built from the error that was detected
private String msgID;
@@ -71,8 +69,8 @@
this.details = details;
this.creationTime = System.currentTimeMillis();
- if (debugEnabled())
- TRACER.debugInfo(" Creating error message" + this.toString()
+ if (logger.isTraceEnabled())
+ logger.trace(" Creating error message" + this.toString()
+ " " + stackTraceToSingleLineString(new Exception("trace")));
}
@@ -89,8 +87,8 @@
this.details = details;
this.creationTime = System.currentTimeMillis();
- if (debugEnabled())
- TRACER.debugInfo(this.toString());
+ if (logger.isTraceEnabled())
+ logger.trace(this.toString());
}
/**
--
Gitblit v1.10.0