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/loggers/RotationActionThread.java | 20 +++++---------------
1 files changed, 5 insertions(+), 15 deletions(-)
diff --git a/opendj3-server-dev/src/server/org/opends/server/loggers/RotationActionThread.java b/opendj3-server-dev/src/server/org/opends/server/loggers/RotationActionThread.java
index 3f48433..05d9493 100644
--- a/opendj3-server-dev/src/server/org/opends/server/loggers/RotationActionThread.java
+++ b/opendj3-server-dev/src/server/org/opends/server/loggers/RotationActionThread.java
@@ -22,18 +22,16 @@
*
*
* Copyright 2006-2008 Sun Microsystems, Inc.
+ * Portions Copyright 2014 ForgeRock AS
*/
package org.opends.server.loggers;
import java.util.ArrayList;
+import org.forgerock.i18n.slf4j.LocalizedLogger;
import org.opends.server.api.DirectoryThread;
import org.opends.server.config.ConfigEntry;
-import static org.opends.server.loggers.debug.DebugLogger.*;
-import org.opends.server.loggers.debug.DebugTracer;
-import org.opends.server.types.DebugLogLevel;
-
/**
* This thread is spawned off at the time of file rotation to
* execute specific actions such as compression, encryption,
@@ -41,11 +39,7 @@
*/
public class RotationActionThread extends DirectoryThread
{
- /**
- * The tracer object for the debug logger.
- */
- private static final DebugTracer TRACER = getTracer();
-
+ private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass();
private ArrayList<ActionType> actions;
private String filename;
@@ -96,8 +90,7 @@
//action = new SignatureAction(filename, alias);
break;
case ENCRYPT:
- String encFile = filename + ".enc";
- //String certAlias =
+ //String certAlias =
// RotationConfigUtil.getCertificateAlias(configEntry);
// FIXME - make the encryption algorithm configurable.
//action = new EncryptAction(filename, encFile, false, certAlias,
@@ -118,10 +111,7 @@
}
} catch(Exception e)
{
- if (debugEnabled())
- {
- TRACER.debugCaught(DebugLogLevel.ERROR, e);
- }
+ logger.traceException(e);
}
}
--
Gitblit v1.10.0