logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Csilla Fabian <csilla.fab...@sde.cz>
Subject Re: Question - RollingFileAppender creates empty files
Date Thu, 17 Sep 2015 06:49:11 GMT

I have several appenders set up, I'm getting one file for one appender, but some appenders
might be unused by the system, that's why there are empty log files.
But I think you answered my question, it's not possible to set up the appender in the XML
config file to create the log file only in case if there's something that needs to be written
to it.


----- Original Message -----
From: "Ralph Goers" <ralph.goers@dslextreme.com>
To: "log4j-user" <log4j-user@logging.apache.org>
Sent: Wednesday, September 16, 2015 6:01:55 PM
Subject: Re: Question - RollingFileAppender creates empty files

The files are created as soon as the output stream is opened. This happens when the Appender
starts.  I’d have to see your configuration to understand why you would be getting multiple
files though.

Ralph

> On Sep 16, 2015, at 7:23 AM, Csilla Fabian <csilla.fabian@sde.cz> wrote:
> 
> Hello,
> 
>  I'm using log4j2 RollingFileAppenders to log events of a complex system. My problem
is that empty log files are created for every appender even if the given subsystem has nothing
to write to them. Is there any way to restrict the number of files using just the XML configuration
file? I could find only programmatic solutions.
> Thank you for the answer.
> 
> Regards,
> Csilla Fabian, SDE
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-user-help@logging.apache.org
> 
> 



---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org


Mime
View raw message