Uploaded image for project: 'Log4j 2'
  1. Log4j 2
  2. LOG4J2-1135

Rollover renames to .zip file without compressing

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.4
    • 2.4.1
    • Appenders
    • None

    Description

      林柏川 (Po-Chuan Lin) reported on the log4j-user mailing list that since 2.4 compression on rollover is broken.

      I see the following output from the status logger:

      2015-09-26 17:43:44,004 main DEBUG RollingFileManager executing synchronous FileRenameAction[logs\test531.log to logs\test531\201509261743\TEST-201509261743-1.log.gz, renameEmptyFiles=false]
      2015-09-26 17:43:44,004 main DEBUG RollingFileManager executing async GzCompressAction[logs\test531\201509261743\TEST-201509261743-1.log to logs\test531\201509261743\TEST-201509261743-1.log.gz, deleteSource=true]
      

      It looks like the file is first renamed to the eventual target file name (with the .zip or .gz etc extension) but not compressed yet. After this the asynchronous compress action tries to rename the moved log file but since the file was renamed to the wrong name it cannot find it and therefore it is not compressed.

      Attachments

        Issue Links

          Activity

            People

              rpopma Remko Popma
              rpopma Remko Popma
              Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: