Log4j 2
  1. Log4j 2
  2. LOG4J2-659

Log files not properly rolled over to the folder.

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: 2.0-rc1
    • Fix Version/s: None
    • Component/s: Appenders
    • Labels:
    • Environment:

      Java 7

      Description

      This is happening in our production environment. My application is using rolling file appender. In the beginning of this month the files are not rolled over to the folders as expected.

      2014-05 folder contains 06/01 and 06/02 rolled over files and 2014-06 folder contains 05/30 file

      In another server 2014-06 folder is not yet created still now and the log files on 06/01 and 06/02 are rolled over to the 2014-05 folder.

      Screen shots have been attached. In the screen shots file names are masked due to the compliance rules.

      Can you please advise what I need to do for resolving this issue?

      The configuration is as below.

      <?xml version="1.0" encoding="UTF-8"?>
      <configuration>
      <properties>
      <property name="logPattern">%c|%K

      {sessionId}

      |%t|%d

      {MM/dd/yyyy HH:mm:ss.SSS}

      |%p|%C|%M|%L|%K

      {msg}

      %n</property>
      <property name="filePattern">$

      {sys:logfilepath}

      //$$

      {date:yyyy-MM}

      //$

      {sys:oft.appserver}

      out%d

      {yyyy-MM-dd}

      .log</property>
      <property name="fileName">$

      {sys:logfilepath}

      //$

      {sys:oft.appserver}

      -out.log</property>
      </properties>
      <appenders>
      <Console name="Console" target="SYSTEM_OUT">
      <PatternLayout pattern="logPattern"/>
      </Console>
      <RollingFile name="RollingFile" fileName="$

      {fileName}

      " filePattern="$

      {filePattern}

      ">
      <PatternLayout>
      <pattern>$

      {logPattern}

      </pattern>
      </PatternLayout>
      <Policies>
      <TimeBasedTriggeringPolicy />
      </Policies>
      </RollingFile>
      </appenders>
      <loggers>
      <AsyncLogger name="logtype" level="info" includeLocation="true" additivity="false">
      <AppenderRef ref="RollingFile"/>
      </AsyncLogger>
      <root level="info">
      <AppenderRef ref="Console"/>
      </root>
      </loggers>
      </configuration>

      1. Log4j.png
        16 kB
        sivan
      2. $$$date_debug _trace.txt
        8 kB
        sivan
      3. $$date_debug _trace.txt
        8 kB
        sivan
      4. 2014-06.png
        4 kB
        sivan
      5. 2014-05.png
        12 kB
        sivan
      6. log4j.png
        10 kB
        sivan

        Activity

        No work has yet been logged on this issue.

          People

          • Assignee:
            Unassigned
            Reporter:
            sivan
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development