-2

We are planning to use Apache Commons IO Tailer for real time log parsing. I want to understand how Tailer works internally, as if i specify delay parameter as 500msec and keys are continuously getting generated and at a very high rate, then will it be able to solve the purpose.

Example:

Tailer has handled till x number of line, now it waits for 500 msec and comes again.

Question:

  1. Does it start from the line it was on previously or it starts from first line each time.
  2. And how does Tailer behaves on file in which data is getting generated in real time, will it continue to tail the file and never stop tailing (and in this situation delay will never come into picture)
bmargulies
  • 91,317
  • 38
  • 166
  • 290
shivamgoel
  • 45
  • 1
  • 11
  • If you want to know how it "works internally", then read the source code: https://github.com/apache/commons-io/blob/master/src/main/java/org/apache/commons/io/input/Tailer.java – Andreas May 12 '17 at 17:40
  • Apache tailer tails the file until it gets EOF and then wait for time specified by delay and then start from the last line read and again tail the file till EOF – shivamgoel May 13 '17 at 16:15

1 Answers1

0

Apache tailer tails the file until it gets EOF and then wait for time specified by delay and then start from the last line read and again tail the file till and so on

shivamgoel
  • 45
  • 1
  • 11