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

.log files are left un-archived after JVM restart

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.0-rc1
    • None
    • Core

    Description

      I am using log4j 2.0-rc1, StructuredDataMessage and EventLogger to perform dynamic logging.

      Attached log4j2.xml configuration meant to:

      • rotate log files on hourly basis OR after file reaches 64 MB (whatever comes first)
      • archive logs that does not satisfy the file pattern

      Whenever JVM is restarted, log4j abandons "old" files un-archived:

      rw-rr-. 1 root root 317625 Feb 24 20:16 2014022419-sim-mdmlocal.mobidia.com.log
      rw-rr-. 1 root root 3333648 Feb 24 20:20 2014022420-activity-mdmlocal.mobidia.com.log

      Listing above shows that file 2014022419-sim-mdmlocal.mobidia.com.log was last touched by the system at 20:16, and should have been archived to .log.gz after restart, which occurred soon after

      Attachments

        1. log4j2.xml
          2 kB
          Bohdan Mushkevych

        Issue Links

          Activity

            People

              Unassigned Unassigned
              mushkevych Bohdan Mushkevych
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: