Index: lutinutil/src/java/org/codelutin/log/LutinLog.java diff -u lutinutil/src/java/org/codelutin/log/LutinLog.java:1.3 lutinutil/src/java/org/codelutin/log/LutinLog.java:1.4 --- lutinutil/src/java/org/codelutin/log/LutinLog.java:1.3 Thu Sep 14 17:43:47 2006 +++ lutinutil/src/java/org/codelutin/log/LutinLog.java Mon Sep 18 10:02:09 2006 @@ -23,9 +23,9 @@ * Created: 9 sept. 06 03:53:09 * * @author poussin - * @version $Revision: 1.3 $ + * @version $Revision: 1.4 $ * - * Last update: $Date: 2006/09/14 17:43:47 $ + * Last update: $Date: 2006/09/18 10:02:09 $ * by : $Author: bpoussin $ */ @@ -47,7 +47,6 @@ public class LutinLog implements Log { - private Timer timer = new Timer("LutinLogTimer", true); private LutinLogFactory factory = null; private Log parent = null; private long activeProgressMonitorTime; @@ -159,10 +158,10 @@ value = -1; if (activeProgressMonitorTime > 0) { - timer.schedule(activeProgressMonitorTask, activeProgressMonitorTime); + factory.getTimer().schedule(activeProgressMonitorTask, activeProgressMonitorTime); } if (timeout > 0) { - timer.schedule(timeoutTask, timeout); + factory.getTimer().schedule(timeoutTask, timeout); } fireProgressEvent(LutinProgressEvent.ProgressType.start); } Index: lutinutil/src/java/org/codelutin/log/LutinLogFactory.java diff -u lutinutil/src/java/org/codelutin/log/LutinLogFactory.java:1.2 lutinutil/src/java/org/codelutin/log/LutinLogFactory.java:1.3 --- lutinutil/src/java/org/codelutin/log/LutinLogFactory.java:1.2 Wed Sep 13 13:26:42 2006 +++ lutinutil/src/java/org/codelutin/log/LutinLogFactory.java Mon Sep 18 10:02:09 2006 @@ -23,14 +23,16 @@ * Created: 9 sept. 06 03:45:29 * * @author poussin - * @version $Revision: 1.2 $ + * @version $Revision: 1.3 $ * - * Last update: $Date: 2006/09/13 13:26:42 $ + * Last update: $Date: 2006/09/18 10:02:09 $ * by : $Author: bpoussin $ */ package org.codelutin.log; +import java.util.Timer; + import org.apache.commons.logging.Log; import org.apache.commons.logging.LogConfigurationException; import org.apache.commons.logging.LogFactory; @@ -51,6 +53,8 @@ protected CategorisedListenerSet listeners = new CategorisedListenerSet(); protected long DefaultActiveProgressMonitorTime = 0; protected long DefaultTimeout = 0; + + private Timer timer; static public LutinLogFactory getInstance() { if (instance == null) { @@ -127,6 +131,7 @@ * @param l */ public void addLutinLogListener(LutinLog log, LutinLogListener l) { + listeners.addCategory(this, log); listeners.add(log, l); } @@ -230,6 +235,16 @@ getParentFactory().setAttribute(arg0, arg1); } + /** + * @return + */ + public Timer getTimer() { + if (timer == null) { + timer = new Timer("LutinLogTimer", true); + } + return timer; + } + }