Uploaded image for project: 'Commons IO'
  1. Commons IO
  2. IO-526

The problem of log acquisition

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Abandoned
    • 2.5
    • None
    • Streams/Writers
    • None
    • Important

    Description

      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!

      Attachments

        Activity

          People

            Unassigned Unassigned
            zhanghua09 张华
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: