Uploaded image for project: 'logback'
  1. logback
  2. LOGBACK-82

Compressing log files does not work correctly

    XMLWordPrintable

Details

    • Icon: Bug Bug
    • Resolution: Incomplete
    • Icon: Major Major
    • None
    • None
    • logback-core
    • None
    • JVM 1.6.10
      Windows 2003 Server
      GigaSpaces 6.0

    Description

      In our environment compressing log files does not work correctly.
      As example here is the logger configuration:

      <appender name="rdf-api-debug-file-appender" class="ch.qos.logback.core.rolling.RollingFileAppender">
      <append>true</append>
      <filter class="ch.qos.logback.classic.filter.ThresholdFilter">
      <level>debug</level>
      </filter>
      <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
      <fileNamePattern>D:/Temp/rdf-files/logs/%d

      {yyyy-MM-dd}

      /debug/rdf-api-debug.log.gz</fileNamePattern>
      </rollingPolicy>
      <layout class="ch.qos.logback.classic.PatternLayout">
      <pattern>%date,%-5level,%logger,%thread,%message%n</pattern>
      </layout>
      </appender>

      At Nov, 5th I see a directory "D:/Temp/rdf-files/logs/2008-11-04/debug" with the following files (and time of last modifucation):
      rdf-api-debug.log, November 05, 2008, 12:12:26 AM
      rdf-api-debug.log855980476945031.tmp, November 05, 2008, 12:11:52 AM
      rdf-api-debug.log856014875320881.tmp, November 05, 2008, 12:12:26 AM
      rdf-api-debug.log.gz, November 05, 2008, 12:11:53 AM

      The first three files and the log file in the .gz-archive have all the same size.
      So compression works, but the original log file and the temporary files are not deleted.

      Our application uses several threads, perhaps this causes the problem.

      Attachments

        Activity

          People

            ceki Ceki Gülcü
            alain Alain Oberdörfer
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: