Hi,
we've got two different applications in two different war-files. In each
war-file there can be found log4j-config with following content:
In war-file 1:
<appender name="app1_Logfile"
class="org.apache.log4j.DailyRollingFileAppender">
<param name="File"
value="${catalina.base}/logs/ApplicationOne.log"/>
<param name="DatePattern" value="'.'yyyy-MM-dd"/>
<param name="Threshold" value="INFO"/>
<layout class="de.company.app1.utils.Log4JMemoryLayout">
<!-- The default pattern: Date Priority [Category]
Message\n -->
<param name="ConversionPattern" value="%d %-5p [%c]
%m%n"/>
<!-- The full pattern: Date MS Priority [Category]
(Thread:NDC) Message\n
<param name="ConversionPattern" value="%d %-5r %-5p
[%c] (%t:%x) %m%n"/>
-->
</layout>
</appender>
<root>
<appender-ref ref="app1_Logfile"/>
</root>
In war-file 2:
<appender name="app2_Logfile"
class="org.apache.log4j.DailyRollingFileAppender">
<param name="File"
value="${catalina.base}/logs/ApplicationTwo.log"/>
<param name="DatePattern" value="'.'yyyy-MM-dd"/>
<param name="Threshold" value="INFO"/>
<layout class="de.company.app2.utils.Log4JMemoryLayout">
<!-- The default pattern: Date Priority [Category]
Message\n -->
<param name="ConversionPattern" value="%d %-5p [%c]
%m%n"/>
<!-- The full pattern: Date MS Priority [Category]
(Thread:NDC) Message\n
<param name="ConversionPattern" value="%d %-5r %-5p
[%c] (%t:%x) %m%n"/>
-->
</layout>
</appender>
<root>
<appender-ref ref="app2_Logfile"/>
</root>
My problem is, that all logfile entries will be appended to
"ApplicationOne.log" even the outputs of the second application. I thought
different applications in different war-files would create different logfiles,
too. The log4j library is located in server/lib in my tomcat so all
applications are using the same libraries. Is there anything that I forgot in
my configuration?
Many thanks,
Jason
_______________________________________________________________________
Jetzt neu! Schützen Sie Ihren PC mit McAfee und WEB.DE. 30 Tage
kostenlos testen. http://www.pc-sicherheit.web.de/startseite/?mc=022220
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]