log4j logs are not rolling

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

log4j logs are not rolling

Herb-7
Hello,
We are using log4j 1.2.8, and have this config in our .xml file.

    <appender name="file" class="org.apache.log4j.RollingFileAppender">
        <param name="File" value="/logs/${computername}_log4j_logger.log"/>
        <param name="MaxFileSize" value="5000KB"/>
        <param name="MaxBackupIndex" value="10"/>
        <param name="threshold" value="debug"/>
        <layout class="org.apache.log4j.PatternLayout">
            <param name="ConversionPattern" value="%d [%t][%p] - %m%n"/>
        </layout>
    </appender>

When I deploy a new app and restart the clustered weblogic appservers, the logs
rollover as expected. Then, later if I hot deploy a new app and do not restart
the appservers, the logs stop rolling. At MaxFileSize the main log file gets
overwritten, .log.1 is moved to .log.2, but a new .log.1 is not created. BEA
say that is not their issue. I would apppreciate any help someone could offer.
Thanks.


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

RE: log4j logs are not rolling

McDonnell, Colm (MLIM)
I have encountered this before, the thread from the archives is
available here:

http://marc.theaimsgroup.com/?l=log4j-user&m=110209512110073&w=2

In summary, the problem is caused by WebLogic keeping the file handle to
the first log file open after a restart thereby preventing subsequent
attempts by log4J to overwrite it. The solution is to invoke
o.a.log4j.LogManager.shutdown() when your application is shutdown.
However, as the thread explains this has proven to be difficult for the
WLS 'redeploy' operation.



-----Original Message-----
From: news [mailto:[hidden email]] On Behalf Of Herb
Sent: 04 May 2005 21:45
To: [hidden email]
Subject: log4j logs are not rolling


Hello,
We are using log4j 1.2.8, and have this config in our .xml file.

    <appender name="file" class="org.apache.log4j.RollingFileAppender">
        <param name="File"
value="/logs/${computername}_log4j_logger.log"/>
        <param name="MaxFileSize" value="5000KB"/>
        <param name="MaxBackupIndex" value="10"/>
        <param name="threshold" value="debug"/>
        <layout class="org.apache.log4j.PatternLayout">
            <param name="ConversionPattern" value="%d [%t][%p] - %m%n"/>
        </layout>
    </appender>

When I deploy a new app and restart the clustered weblogic appservers,
the logs
rollover as expected. Then, later if I hot deploy a new app and do not
restart
the appservers, the logs stop rolling. At MaxFileSize the main log file
gets
overwritten, .log.1 is moved to .log.2, but a new .log.1 is not created.
BEA
say that is not their issue. I would apppreciate any help someone could
offer.
Thanks.


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]
--------------------------------------------------------

If you are not an intended recipient of this e-mail, please notify the sender, delete it and do not read, act upon, print, disclose, copy, retain or redistribute it. Click here for important additional terms relating to this e-mail.     http://www.ml.com/email_terms/
--------------------------------------------------------

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: log4j logs are not rolling

Herb-7
Thanks very much!




---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]