Log4j 1.2.x reached end-of-life in August of 2015. It really hasn’t been 
supported for at least 6 years and none of the current committers have any 
recent familiarity with it. I would suggest you upgrade to Log4j 2. You might 
try asking on Stackoverflow and see if you have better luck.

Ralph

> On Nov 24, 2020, at 8:19 AM, Sailesh Chandran <[email protected]> 
> wrote:
> 
> Hi,
>  We currently use Log4J version 1.2.16 in our product. We have a 
> multi-threaded application and notice this crazy problem. Hope someone would 
> have a clue about this.
> 
> For testing purpose
> 
> 1. We create an object of TimeAndSizeRollingAppender.
> 2. Set the rollover pattern to every minute.
> 3. Start pushing in data using the MDC.put() in a loop for a count of say 
> 100000
> 
> Problem
> 
> Log4j starts to rollover the files.
> 
> File name = duplicate.siem.2020-11-24-20-07.1 (first file)
> 
> Counter=1
> Counter=2
> ..
> ..
> 
> 
> File name= duplicate.siem.2020-11-24-20-07.2 (second file)
> 
> Counter=196240 (duplicate entry)
> Counter=196240
> Counter=196241
> 
> 
> All rolled over files have the same issue. The first log line will have 
> duplicate entries.
> 
> Thanks,
> Sailesh.


Reply via email to