[
https://issues.apache.org/jira/browse/IO-526?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Pascal Schumacher updated IO-526:
---------------------------------
Fix Version/s: (was: 2.5)
> The problem of log acquisition
> ------------------------------
>
> Key: IO-526
> URL: https://issues.apache.org/jira/browse/IO-526
> Project: Commons IO
> Issue Type: Bug
> Components: Streams/Writers
> Affects Versions: 2.5
> Reporter: 张华
>
> Problem Description:
> Recently a problem appeared in the use of commons io 2.5 when Tailer
> class is in the process of monitoring and reading log files: there is lost
> logs and repeatedly collected logs for the collection of log files
> continuously split by time .
> Scene reproduction:
> We use log4j-1.2.17 in our project to generate the log file and split
> it up once every hour. If the current file name is system.log, the file name
> after splitting is system1.log.The Tailer class in commons io 2.5 monitors
> changes to the file every 500 milliseconds.
> 1. The current system.log length is 10, position is also 10, after
> cutting the new system.log length is 20, then this.length is greater than
> position and position is set to 0, the old file collection then repeats (ie,
> system1. Log). New log is missing.
> 2. The current system.log length is 10,position is 10, after cutting new
> system.log length is 10, then this.length is equal to position, no log
> information is read. New file logs is missing.
> I hope commons io team can solve this problem, thank you!
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)