commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From 张华 (JIRA) <>
Subject [jira] [Created] (IO-526) The problem of log acquisition
Date Thu, 05 Jan 2017 02:16:58 GMT
张华 created IO-526:

             Summary: The problem of log acquisition
                 Key: IO-526
             Project: Commons IO
          Issue Type: Bug
          Components: Streams/Writers
    Affects Versions: 2.5
            Reporter: 张华
             Fix For: 2.5

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
    I hope commons io team can solve this problem, thank you!

This message was sent by Atlassian JIRA

View raw message