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 "Mohammad Melhem (JIRA)" <ji...@apache.org> on 2014/07/16 10:45:06 UTC
[jira] [Created] (LOG4J2-717) Logging after web application reload
Mohammad Melhem created LOG4J2-717:
--------------------------------------
Summary: 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-rc2, 2.0-rc1
Environment: Windows 7, Java Web Application with tomcat, Servlet API 3.0
Reporter: Mohammad Melhem
Fix For: 2.0-rc2, 2.0-rc1
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