Log4j 2
  1. Log4j 2
  2. LOG4J2-642

Mismatch in Rollover date and log entry date in the log file

    Details

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

      Java 7

      Description

      This is an issue with the rollbacking of the log file. The file is rollbacked as inst4-out-2014-05-16.log. But the log entry is created on 2014-05-19. So many log files are rollbacked like this. The configuration is as follows. Can you please advise why this is happening?

      <?xml version="1.0" encoding="UTF-8"?>
      <configuration>
      	<properties>
      		<property name="logPattern">log_type_%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 />
      				<SizeBasedTriggeringPolicy />
      			</Policies>
      			<DefaultRolloverStrategy compressionLevel="0" max="3"/>
      		</RollingFile>	
      	</appenders>
      	<loggers>					
      		<AsyncLogger name="sso" level="info" includeLocation="true" additivity="false">
      			<AppenderRef ref="RollingFile"/>
      		</AsyncLogger>
      		<AsyncLogger name="webservice" level="info" includeLocation="true" additivity="false">
      			<AppenderRef ref="RollingFile"/>
      		</AsyncLogger>
      		<root level="info">
      			<AppenderRef ref="Console"/>
      		</root>
      	</loggers>
      </configuration>
      

      Below is the Log Entry from log file.

      log_type_webservice|job-945|ump-standard-jobType-203-sessKey-job-945|05/19/2014 15:29:29.374|INFO|com.mmp.webservice.wsFactory|factory|109|Service#FirmSTP#$$#Starts creating the ws client: FirmSTP
      
      1. logFolder.png
        6 kB
        sivan
      2. rolledLogFile.png
        17 kB
        sivan
      3. rolloverFile.png
        3 kB
        sivan

        Activity

        sivan made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Fix Version/s 2.0-rc1 [ 12325011 ]
        Resolution Fixed [ 1 ]
        sivan made changes -
        Attachment rolloverFile.png [ 12646276 ]
        sivan made changes -
        Attachment rolledLogFile.png [ 12645794 ]
        Ralph Goers made changes -
        Summary Mismatch in Rollback date and log entry date in the log file Mismatch in Rollover date and log entry date in the log file
        sivan made changes -
        Attachment logFolder.png [ 12645753 ]
        Remko Popma made changes -
        Field Original Value New Value
        Description This is an issue with the rollbacking of the log file. The file is rollbacked as inst4-out-2014-05-16.log. But the log entry is created on 2014-05-19. So many log files are rollbacked like this. The configuration is as follows. Can you please advise why this is happening?

        <?xml version="1.0" encoding="UTF-8"?>
        <configuration>
        <properties>
        <property name="logPattern">log_type_%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 />
        <SizeBasedTriggeringPolicy />
        </Policies>
        <DefaultRolloverStrategy compressionLevel="0" max="3"/>
        </RollingFile>
        </appenders>
        <loggers>
        <AsyncLogger name="sso" level="info" includeLocation="true" additivity="false">
        <AppenderRef ref="RollingFile"/>
        </AsyncLogger>
        <AsyncLogger name="webservice" level="info" includeLocation="true" additivity="false">
        <AppenderRef ref="RollingFile"/>
        </AsyncLogger>
        <root level="info">
        <AppenderRef ref="Console"/>
        </root>
        </loggers>
        </configuration>


        Below is the Log Entry from log file.
        log_type_webservice|job-945|ump-standard-jobType-203-sessKey-job-945|05/19/2014 15:29:29.374|INFO|com.mmp.webservice.wsFactory|factory|109|Service#FirmSTP#$$#Starts creating the ws client: FirmSTP
        This is an issue with the rollbacking of the log file. The file is rollbacked as inst4-out-2014-05-16.log. But the log entry is created on 2014-05-19. So many log files are rollbacked like this. The configuration is as follows. Can you please advise why this is happening?

        {code}
        <?xml version="1.0" encoding="UTF-8"?>
        <configuration>
        <properties>
        <property name="logPattern">log_type_%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 />
        <SizeBasedTriggeringPolicy />
        </Policies>
        <DefaultRolloverStrategy compressionLevel="0" max="3"/>
        </RollingFile>
        </appenders>
        <loggers>
        <AsyncLogger name="sso" level="info" includeLocation="true" additivity="false">
        <AppenderRef ref="RollingFile"/>
        </AsyncLogger>
        <AsyncLogger name="webservice" level="info" includeLocation="true" additivity="false">
        <AppenderRef ref="RollingFile"/>
        </AsyncLogger>
        <root level="info">
        <AppenderRef ref="Console"/>
        </root>
        </loggers>
        </configuration>
        {code}


        Below is the Log Entry from log file.
        {code}
        log_type_webservice|job-945|ump-standard-jobType-203-sessKey-job-945|05/19/2014 15:29:29.374|INFO|com.mmp.webservice.wsFactory|factory|109|Service#FirmSTP#$$#Starts creating the ws client: FirmSTP
        {code}
        sivan created issue -

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development