You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-user@logging.apache.org by Bh...@iflexsolutions.com on 2008/04/24 13:59:46 UTC
log4j 1.2.15 Rolling file appender building files.. not rolling them
Hi,
Using log4j version 1.2.15.
RollingFileAppender used in the configuration works fine with the app
deployed on the local machine, with MaxFileSize and MaxBackUp index
behaving as expected. However on a server where the application is
deployed, the log files build up to much higher sizes - 5MB, 3MB etc and
the BackUp files are randomly deleted. I see only infra.log and
infra.log.2 etc.
Any lead on this will be truly appreciated.
A section of my log4j.xml:
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/">
<appender name="INFRA_INFO"
class="org.apache.log4j.RollingFileAppender">
<param name="File" value="D:/logs/infra/infra_info.log"/>
<param name="Append" value="true"/>
<param name="MaxFileSize" value="1MB"/>
<param name="MaxBackupIndex" value="2"/>
<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern"
value="%d{dd:MM:yyyy HH:mm:ss} %p - %C{1}.%M(%L) |
%m%n"/>
</layout>
<filter class="org.apache.log4j.varia.LevelRangeFilter">
<param name="LevelMin" value="INFO"/>
<param name="LevelMax" value="INFO"/>
<param name="AcceptOnMatch" value="true"/>
</filter>
<filter class="org.apache.log4j.varia.DenyAllFilter"/>
</appender>
<logger name="com.xyz.abc.infra">
<level value="INFO"/>
<appender-ref ref="INFRA_INFO"/>
</logger>
</log4j:configuration>
Regards,
Bhramara
Extn: 6279
DISCLAIMER:
This message contains privileged and confidential information and is intended only for an individual named. If you are not the intended recipient, you should not disseminate, distribute, store, print, copy or deliver this message. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system. E-mail transmission cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete or contain viruses. The sender, therefore, does not accept liability for any errors or omissions in the contents of this message which arise as a result of e-mail transmission. If verification is required, please request a hard-copy version.
RE: log4j 1.2.15 Rolling file appender building files.. not rolling them
Posted by Bh...@iflexsolutions.com.
>Possibly, or one application server with multiple instances of an app,
>or one application server with one instance of an app with 2 different
>RollingFileAppenders, etc.
Hi,
There is a single app running on the server which logs to the said
files. And there are multiple RollingFileAppenders, but each write to a
different file. So no 2 RollingFileAppender s write to the same file.
But some how the rolling is not working? It's still building up. Its
10MB now, though I have set it to 1MB for rolling.
Regards,
Bhramara
Extn: 6279
-----Original Message-----
From: Curt Arnold [mailto:carnold@apache.org]
Sent: Friday, April 25, 2008 6:38 PM
To: Log4J Users List
Subject: Re: log4j 1.2.15 Rolling file appender building files.. not
rolling them
On Apr 24, 2008, at 10:57 PM,
Bhramara.Chickamuniswamy@iflexsolutions.com
wrote:
> Hi,
>
> Thanks for the response.
>
> By multiple instances writing to the same file, do u mean multiple
> application servers, with the same application deployed, on the single
> machine writing to same file? Because right now, we only have one
> application server + application running, which logs to the files.
>
> Regards,
> Bhramara
>
Possibly, or one application server with multiple instances of an app,
or one application server with one instance of an app with 2 different
RollingFileAppenders, etc.
---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org
DISCLAIMER:
This message contains privileged and confidential information and is intended only for an individual named. If you are not the intended recipient, you should not disseminate, distribute, store, print, copy or deliver this message. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system. E-mail transmission cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete or contain viruses. The sender, therefore, does not accept liability for any errors or omissions in the contents of this message which arise as a result of e-mail transmission. If verification is required, please request a hard-copy version.
---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org
Re: log4j 1.2.15 Rolling file appender building files.. not rolling them
Posted by Curt Arnold <ca...@apache.org>.
On Apr 24, 2008, at 10:57 PM, Bhramara.Chickamuniswamy@iflexsolutions.com
wrote:
> Hi,
>
> Thanks for the response.
>
> By multiple instances writing to the same file, do u mean multiple
> application servers, with the same application deployed, on the single
> machine writing to same file? Because right now, we only have one
> application server + application running, which logs to the files.
>
> Regards,
> Bhramara
>
Possibly, or one application server with multiple instances of an app,
or one application server with one instance of an app with 2 different
RollingFileAppenders, etc.
---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org
RE: log4j 1.2.15 Rolling file appender building files.. not rolling them
Posted by Bh...@iflexsolutions.com.
Hi,
Thanks for the response.
By multiple instances writing to the same file, do u mean multiple
application servers, with the same application deployed, on the single
machine writing to same file? Because right now, we only have one
application server + application running, which logs to the files.
Regards,
Bhramara
-----Original Message-----
From: Curt Arnold [mailto:carnold@apache.org]
Sent: Friday, April 25, 2008 4:39 AM
To: Log4J Users List
Subject: Re: log4j 1.2.15 Rolling file appender building files.. not
rolling them
On Apr 24, 2008, at 6:59 AM,
Bhramara.Chickamuniswamy@iflexsolutions.com wrote:
> Hi,
>
> Using log4j version 1.2.15.
>
> RollingFileAppender used in the configuration works fine with the app
> deployed on the local machine, with MaxFileSize and MaxBackUp index
> behaving as expected. However on a server where the application is
> deployed, the log files build up to much higher sizes - 5MB, 3MB etc
> and
> the BackUp files are randomly deleted. I see only infra.log and
> infra.log.2 etc.
>
A failure on an attempt to rename a file may keep the file active
longer than expected. In addition, if you have multiple instances
writing to the same file, then the rollover logic will only attempt to
role when that particular instance has written enough data to have the
file reach the rollover threshold. If you do have multiple instances
writing to the same thing, bad things are very likely to occur after
the rollover is trigger. The specifics vary by platform.
First, may sure that you do not have multiple instances writing to the
same file. If the problem persists, try to find if anything else
(backup software, viewers, etc) are keep the files open.
---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org
DISCLAIMER:
This message contains privileged and confidential information and is intended only for an individual named. If you are not the intended recipient, you should not disseminate, distribute, store, print, copy or deliver this message. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system. E-mail transmission cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete or contain viruses. The sender, therefore, does not accept liability for any errors or omissions in the contents of this message which arise as a result of e-mail transmission. If verification is required, please request a hard-copy version.
---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org
Re: log4j 1.2.15 Rolling file appender building files.. not rolling them
Posted by Curt Arnold <ca...@apache.org>.
On Apr 24, 2008, at 6:59 AM,
Bhramara.Chickamuniswamy@iflexsolutions.com wrote:
> Hi,
>
> Using log4j version 1.2.15.
>
> RollingFileAppender used in the configuration works fine with the app
> deployed on the local machine, with MaxFileSize and MaxBackUp index
> behaving as expected. However on a server where the application is
> deployed, the log files build up to much higher sizes - 5MB, 3MB etc
> and
> the BackUp files are randomly deleted. I see only infra.log and
> infra.log.2 etc.
>
A failure on an attempt to rename a file may keep the file active
longer than expected. In addition, if you have multiple instances
writing to the same file, then the rollover logic will only attempt to
role when that particular instance has written enough data to have the
file reach the rollover threshold. If you do have multiple instances
writing to the same thing, bad things are very likely to occur after
the rollover is trigger. The specifics vary by platform.
First, may sure that you do not have multiple instances writing to the
same file. If the problem persists, try to find if anything else
(backup software, viewers, etc) are keep the files open.
---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org