I added log4j.xml in classes dir in .war and log4j.jar in WEB-INF/lib dir in .war. This helped me in getting the logs in app.log, but didn't stop logs in catalina.out
On Wed, Oct 29, 2008 at 2:50 AM, Mark Thomas <[EMAIL PROTECTED]> wrote: > Mohit Anchlia wrote: >> ?xml version="1.0" encoding="UTF-8"?> >> <!DOCTYPE log4j:configuration SYSTEM "log4j.dtd"> >> >> <log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/" >> debug="false"> >> <!-- <configuration xmlns="http://logging.apache.org/" debug="true"> --> >> >> <appender name="APP_LOG" >> class="org.apache.log4j.DailyRollingFileAppender"> >> <param name="File" value="/usr/local/tomcat/logs/app.log"/> >> <param name="Append" value="true"/> >> <param name="DatePattern" value="'.'yyyy-MM-dd"/> >> <layout class="org.apache.log4j.PatternLayout"> >> <param name="ConversionPattern" value="%d{ISO8601} %-5p - %m%n"/> >> </layout> >> </appender> >> <appender name="HTTPCLIENT_LOG" >> class="org.apache.log4j.DailyRollingFileAppender"> >> <param name="File" value="/usr/local/tomcat/logs/httpclient.log"/> >> <param name="Append" value="true"/> >> <param name="DatePattern" value="'.'yyyy-MM-dd"/> >> <layout class="org.apache.log4j.PatternLayout"> >> <param name="ConversionPattern" value="%d{ISO8601} %-5p - %m%n"/> >> </layout> >> </appender> >> >> <logger name="com.efp.eapp" additivity="false"> >> <appender-ref ref="APP_LOG"/> >> </logger> >> >> <logger name="org.apache.commons.httpclient" additivity="false"> >> <appender-ref ref="HTTPCLIENT_LOG"/> >> </logger> >> </log4j:configuration> > > What steps did you follow to enable log4j logging? > > Mark > > > > --------------------------------------------------------------------- > To start a new topic, e-mail: users@tomcat.apache.org > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]