Hi,<br><br>I have a couple of applications running on one tomcat instance. I use the following xml file for each application substituting contextX for the<br>application name, however, when I start tomcat only one context is initialized and all log messages are sent to that context.
<br><br>Is it possible to have a log file for each application in a tomcat instance?<br><br>Thanks,<br><br>Chris.<br><br>[code]<br><?xml version="1.0" encoding="UTF-8" ?><br><configuration>
<br><br> <appender name="stdout" class="ch.qos.logback.core.ConsoleAppender"><br> <rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy"><br> <FileNamePattern>/var/log/tomcat6/catalina.%i.out</FileNamePattern>
<br> <MinIndex>1</MinIndex><br> <MaxIndex>7</MaxIndex><br> </rollingPolicy><br> <triggeringPolicy class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
<br> <MaxFileSize>5MB</MaxFileSize><br> </triggeringPolicy> <br> <layout class="ch.qos.logback.classic.PatternLayout"><br> <pattern>%d %-5level [%thread] %class | %msg%n</pattern>
<br> </layout> <br> </appender><br> <br> <appender name="contextX" class="ch.qos.logback.core.rolling.RollingFileAppender"><br> <File>/var/log/tomcat6/contextX.log</File>
<br> <rollingPolicy<br> class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"><br> <FileNamePattern>/var/log/tomcat6/contextX.%d.log</FileNamePattern><br> </rollingPolicy>
<br> <layout class="ch.qos.logback.classic.PatternLayout"><br> <pattern>%date{ISO8601} %-5level [%thread] %class | %msg%n</pattern><br> </layout><br> <Encoding>UTF-8</Encoding>
<br> <BufferedIO>false</BufferedIO><br> <ImmediateFlush>true</ImmediateFlush><br> </appender><br> <br> <logger name="org.springframework" additivity="false">
<br> <level value="WARN"/><br> <appender-ref ref="contextX" /><br> </logger><br> <logger name="com.contextX" additivity="false"><br> <level value="WARN"/>
<br> <appender-ref ref="contextX" /><br> </logger><br> <logger name="org.hibernate" additivity="false"><br> <level value="WARN"/><br> <appender-ref ref="contextX" />
<br> </logger><br> <logger name="org.apache.velocity" additivity="false"><br> <level value="WARN"/><br> <appender-ref ref="contextX" /> <br> </logger>
<br> <logger name="org.acegisecurity" additivity="false"><br> <level value="INFO"/><br> <appender-ref ref="contextX" /> <br> </logger><br> <logger name="
org.directwebremoting" additivity="false"><br> <level value="WARN"/><br> <appender-ref ref="contextX" /> <br> </logger><br> <br> <logger name="org.apache
" additivity="false"><br> <level value="WARN"/><br> <appender-ref ref="stdout" /><br> </logger><br> <br> <root><br> <level value="WARN"/>
<br> <appender-ref ref="stdout"/><br> </root><br></configuration><br>[code]<br><br>