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

Time based logfile rotation does not log, uses 1970-01-01 as date

    XMLWordPrintable

Details

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Critical Critical
    • None
    • None
    • logback-core
    • None
    • Operating System: Linux
      Platform: PC

    • 86

    Description

      Sometimes/Most of the time TimebasedRolling does not work.

      • Log files have 1970-01-01 for %d in the name.
      • Log files contain only one line i.e. file gets overwritten with every log statement.
      • restart seems to help, probably till midnight
      • did not happen with older versions SLF4J 1.3 and (probably) Logback 0.9.3

      Used in combination with jcl-over-slf.

      <appender name="XXX_FILE" class="ch.qos.logback.core.rolling.RollingFileAppender" >
      <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
      <FileNamePattern> ${XxxLogDir}/xxx.%d.log </FileNamePattern>
      </rollingPolicy>
      <layout class="ch.qos.logback.classic.PatternLayout">
      <pattern> %date %-5level [%8.-8mdc

      {tid}

      ][%15.15mdc

      {uid}

      ] [%logger

      {20}

      ] %msg%n </pattern>
      </layout>
      </appender>

      Attachments

        Activity

          People

            logback-dev Logback dev list
            8625330 Stefan
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: