From 9a2b7fab9d523ff7867840d43cc6739de7c5ee4d Mon Sep 17 00:00:00 2001
From: jvergara <jvergara@localhost>
Date: Mon, 03 Nov 2008 10:40:33 +0000
Subject: [PATCH] Modify the MainMenuBar and MainActionsPane so that they can be extended. Fix a problem with the ControlPanelLog class: now when it is extended only one log file is created.
---
opends/src/guitools/org/opends/guitools/controlpanel/util/ControlPanelLog.java | 5 ++---
1 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/opends/src/guitools/org/opends/guitools/controlpanel/util/ControlPanelLog.java b/opends/src/guitools/org/opends/guitools/controlpanel/util/ControlPanelLog.java
index d25b999..94b9299 100644
--- a/opends/src/guitools/org/opends/guitools/controlpanel/util/ControlPanelLog.java
+++ b/opends/src/guitools/org/opends/guitools/controlpanel/util/ControlPanelLog.java
@@ -44,6 +44,7 @@
"org.opends"
};
static private File logFile = null;
+ static private FileHandler fileHandler;
/**
* Creates a new file handler for writing log messages to the file indicated
@@ -55,7 +56,7 @@
if (!isInitialized())
{
logFile = file;
- FileHandler fileHandler = new FileHandler(logFile.getCanonicalPath());
+ fileHandler = new FileHandler(logFile.getCanonicalPath());
fileHandler.setFormatter(new SimpleFormatter());
for (String packageName : packages)
{
@@ -76,8 +77,6 @@
* @throws IOException if something goes wrong
*/
static public void initPackage(String packageName) throws IOException {
- FileHandler fileHandler = new FileHandler(logFile.getCanonicalPath());
- fileHandler.setFormatter(new SimpleFormatter());
Logger logger = Logger.getLogger(packageName);
logger.setUseParentHandlers(false); // disable logging to console
logger.addHandler(fileHandler);
--
Gitblit v1.10.0