Archived
0

clear file and reader on stop watcher

This commit is contained in:
iMoHax
2016-06-03 16:39:31 +03:00
parent 2e1571a3ed
commit fa3ff32587
3 changed files with 84 additions and 69 deletions

View File

@@ -24,8 +24,8 @@ public class LogWatcherTest {
LOG.info("Test log watcher");
LogHandler handler = new LogReader(".+\\.log$");
String path = readLine("Watch dir:");
LogWatcher watcher = new LogWatcher(path, handler);
watcher.start();
LogWatcher watcher = new LogWatcher(handler);
watcher.start(path);
Thread.sleep(5*60*1000);
watcher.stop();
}