From 9c954f1411d833f43c98ad3bc607c4ec4f07aaf5 Mon Sep 17 00:00:00 2001
From: boli <boli@localhost>
Date: Fri, 08 Jun 2007 18:50:35 +0000
Subject: [PATCH] Fixed an issue where the error log doesn't actually log messages. Also improved the performance of the loggers when they are disabled.
---
opends/src/server/org/opends/server/tools/BackUpDB.java | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/opends/src/server/org/opends/server/tools/BackUpDB.java b/opends/src/server/org/opends/server/tools/BackUpDB.java
index 042364a..7d08dcd 100644
--- a/opends/src/server/org/opends/server/tools/BackUpDB.java
+++ b/opends/src/server/org/opends/server/tools/BackUpDB.java
@@ -38,6 +38,7 @@
import java.util.TimeZone;
import org.opends.server.api.Backend;
+import org.opends.server.api.ErrorLogPublisher;
import org.opends.server.config.ConfigException;
import org.opends.server.core.CoreConfigManager;
import org.opends.server.core.DirectoryServer;
@@ -78,7 +79,7 @@
*/
public class BackUpDB
{
- private static DN publisherDN = null;
+ private static ErrorLogPublisher errorLogPublisher = null;
/**
* The main method for BackUpDB tool.
*
@@ -88,9 +89,9 @@
{
int retCode = mainBackUpDB(args);
- if(publisherDN != null)
+ if(errorLogPublisher != null)
{
- ErrorLogger.removeErrorLogPublisher(publisherDN);
+ ErrorLogger.removeErrorLogPublisher(errorLogPublisher);
}
if(retCode != 0)
@@ -488,11 +489,10 @@
// of the export.
try
{
- publisherDN = DN.decode("cn=Custom Logger for BackUpDB");
- ThreadFilterTextErrorLogPublisher publisher =
+ errorLogPublisher =
new ThreadFilterTextErrorLogPublisher(Thread.currentThread(),
new TextWriter.STDOUT());
- ErrorLogger.addErrorLogPublisher(publisherDN, publisher);
+ ErrorLogger.addErrorLogPublisher(errorLogPublisher);
}
catch(Exception e)
--
Gitblit v1.10.0