01: /*
02: * Created on 08.06.2005
03: *
04: * TODO To change the template for this generated file go to
05: * Window - Preferences - Java - Code Style - Code Templates
06: */
07: package de.schlund.pfixxml.perflogging;
08:
09: import java.util.TimerTask;
10:
11: import org.apache.log4j.Logger;
12:
13: /**
14: * @author jh
15: *
16: */
17: public class LogFileWriterThread extends TimerTask {
18: private final static Logger LOG = Logger
19: .getLogger(LogFileWriterThread.class);
20:
21: public void run() {
22:
23: if (!(PerfLogging.getInstance().isPerfLogggingEnabled() && PerfLogging
24: .getInstance().isPerfLoggingActive())) {
25: LOG.info("PerfLogging not active");
26: }
27:
28: final String str = PerfStatistic.getInstance()
29: .toLogfilePresentation();
30: if (str != null && str.length() > 0) {
31: LOG.info(str);
32: }
33: }
34:
35: }
|