in java TailListener,how to avoid duplicate log messages
my code is given below . public static void main(String[] args) { // TODO code application logic here File pcounter_log = new File("c:\development\temp\test.log"); try { TailerListener listener = new PCTailListener(); Tailer tailer = new Tailer(pcounter_log, listener, 5000,true); Thread thread = new Thread(tailer); thread.start(); } catch (Exception e) { System.out.println(e); } } public class PCTailListener extends TailerListenerAdapter { public void handle(String line) { System.out.println(line); } } .ie, i am monitoring the log file.whenever log messages updated in log file(c:\development