You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-dev@logging.apache.org by "Remko Popma (JIRA)" <ji...@apache.org> on 2014/07/16 13:23:04 UTC

[jira] [Commented] (LOG4J2-717) Logging after web application reload

    [ https://issues.apache.org/jira/browse/LOG4J2-717?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14063392#comment-14063392 ] 

Remko Popma commented on LOG4J2-717:
------------------------------------

Did you try the append="true" attribute on the file appender config?

If that doesn't solve the issue, can you post the contents of your config?

> Logging after web application reload
> ------------------------------------
>
>                 Key: LOG4J2-717
>                 URL: https://issues.apache.org/jira/browse/LOG4J2-717
>             Project: Log4j 2
>          Issue Type: Improvement
>          Components: Appenders
>    Affects Versions: 2.0-rc1, 2.0-rc2
>         Environment: Windows 7, Java Web Application with tomcat, Servlet API 3.0
>            Reporter: Mohammad Melhem
>             Fix For: 2.0-rc1, 2.0-rc2
>
>   Original Estimate: 48h
>  Remaining Estimate: 48h
>
> I have a web app that logs to files using RollingFileAppender. it simply has the log4j2.xml in the classpath and it contains where to log with the required policies and everything worked fine (since Servlet API 3.0 is used, there is no special configs needed as I saw on the website). the problem happens when I reload the web app. It starts writing over the old log files and go through the same pattern. now I kinda know what is the source of this problem. Unfortunately, the one who deployed the web apps has put the log4j lib into each web app instead of putting it inside tomcat lib folder and defined a logger for each web app, so each time the web app is reloaded, it's like the logger doesn't see the the log files that are already created previously. So, Can anyone give me a solution so that when reloading it will just continue the normal behaviour (continue writing on the last file or create a new one). 



--
This message was sent by Atlassian JIRA
(v6.2#6252)

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