阅读背景:

使用Java和org.apache.commons.io.input.Tailer记录监视器问题

来源:互联网 

I am trying to use this to monitor a log file and put the log lines in a database as they come in. The problem I am having is that it seems while the thread containing my TailerListener is running, I cannot delete or rename the log file. This being the case, I am not sure how this will react when the log file rolls over, which happens nightly. I glanced at the code for Tailer and it appears to handle log rollover, but I can't see how when the file being monitored is basically locked.I am trying to use this to monitor a log file a




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: