I have the following code,
public class Identifier extends TailerListenerAdapter {
public static void main(String args[]) throws InterruptedException {
TailerListener listener = new Identifier();
Tailer tailer = new Tailer(inputFile, listener, 500);
tailer.run();
while (true){
}
}
@Override
public void handle(String line) {
super.handle(line);
System.out.println(line);
}
}
This is the total code I am using for the tailing service, I have a file which contains more that 100K lines but the tailer only prints first 20 line.
What I am missing, I have also tried using the thread like this.
Thread tailerThread = new Thread(tailer);
tailerThread.start();