logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gary Gregory <garydgreg...@gmail.com>
Subject Re: log4j2 creates empty log file when configuration happens
Date Wed, 21 Dec 2016 18:59:46 GMT
Yes, this is a new feature in 2.7, please see LOG4J2-1504
https://issues.apache.org/jira/browse/LOG4J2-1504 and "createOnDemand" in

Happy Hols!

On Wed, Dec 21, 2016 at 12:38 AM, Tarun Sharma <tarun.k.sharma@oracle.com>

> Hi All,
> I have recently upgraded to log4j2 and find that log4j creates empty log
> files for all my rolling file appenders when the java process starts up and
> initializes the log4j context.
> So, even if some of my job threads are not running, they have empty log
> files created for the related appenders.
> Is there a way to postpone the creation of log file to the time when first
> LogEvent is triggered?
> Thanks and Regards,
> Tarun

E-Mail: garydgregory@gmail.com | ggregory@apache.org
Java Persistence with Hibernate, Second Edition

JUnit in Action, Second Edition

Spring Batch in Action
Blog: http://garygregory.wordpress.com
Home: http://garygregory.com/
Tweet! http://twitter.com/GaryGregory

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message