How to avoid old log messages in TailerListener
I am using the Apache Commons Tailer API to monitor the log files.
Whenever I restart the application, old log messa开发者_C百科ges are also displayed. Instead only new log messages should get displayed.
How do I avoid this behavior of getting the old log messages?
Did you use the 4-argument Tailer constructor and pass true for the last argument (end)? This should make sure that only new lines are returned.
The last argument is documented like this:
Set to
trueto tail from the end of the file,falseto tail from the beginning of the file.
 加载中,请稍侯......
      
精彩评论