castriottaa opened a new issue, #1958:
URL: https://github.com/apache/logging-log4j2/issues/1958

   ## Description
   
   My java app configures log4j2 with the following instruction:
   
   `org.apache.logging.log4j.core.config.Configurator.reconfigure(new 
File(iniDir, LOG4JBATCH_CONF).toURI());`
   
   The configuration is the following, with daily rolling strategy:
   
   `<?xml version="1.0" encoding="UTF-8"?>
   <Configuration status="INFO">
        <Appenders>
                <Console name="console" target="SYSTEM_OUT">
                        <PatternLayout pattern="%-5p %d{ISO8601} [%-t] [%c:%L] 
%m%n" />
                </Console>
                <RollingFile name="trace" 
fileName="${path.batch.log}/trace.log" 
filePattern="${path.batch.log}/trace.log-%d{yyyy-MM-dd}">
                        <PatternLayout pattern="%-5p %d{ISO8601} [%-t] [%c:%L] 
%m%n" />
                        <Policies>
                                <TimeBasedTriggeringPolicy interval="1" 
modulate="true" />
                        </Policies>
                        <DefaultRolloverStrategy max="10" />
                </RollingFile>
                <RollingFile name="times" 
fileName="${path.batch.log}/times.log" 
filePattern="${path.batch.log}/times.log-%d{yyyy-MM-dd}">
                        <PatternLayout pattern="%-5p %d{ISO8601} [%-t] [%c:%L] 
%m%n" />
                        <Policies>
                                <TimeBasedTriggeringPolicy interval="1" 
modulate="true" />
                        </Policies>
                        <DefaultRolloverStrategy max="10" />
                </RollingFile>
        </Appenders>`
   
   Despite this, the trace.log of the previous day has been completely 
overwritten by the current execution, generating the following situation:
   
   - trace.log-2023-11-08 => contains only the first line of the execution of 
the 2023-11-09 (all logs of 2023-11-08 are vanished)
   - trace.log => contains the logs of the execution of the 2023-11-09 (from 
the second line!)
   
   This is not happened the day before.
   
   ## Configuration
   
   **Version:** 2.20.0
   
   **Operating system:** Red Hat Enterprise Linux Server 7.5 (Maipo)
   
   **JDK:** 
   
   java version "1.8.0_211"
   Java(TM) SE Runtime Environment (build 1.8.0_211-b12)
   Java HotSpot(TM) 64-Bit Server VM (build 25.211-b12, mixed mode)
   
   ## Logs
   
   NA
   
   ## Reproduction
   
   It's not clear how it can be reproduced.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscr...@logging.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to