01: package net.sf.jftp.gui.base;
02:
03: import net.sf.jftp.JFtp;
04: import net.sf.jftp.config.Settings;
05:
06: public class LogFlusher implements Runnable {
07: private Thread runner;
08:
09: public LogFlusher() {
10: runner = new Thread(this );
11:
12: if (Settings.useLogFlusher) {
13: runner.start();
14: }
15: }
16:
17: public void run() {
18: while (true) {
19: try {
20: runner.sleep(Settings.logFlushInterval);
21: } catch (InterruptedException ex) {
22: ex.printStackTrace();
23: }
24:
25: //System.out.println("logflush");
26: JFtp.statusP.jftp.ensureLogging();
27: }
28: }
29: }
|