problem commons logging / log4j setup open webapp tomcat 6


i have problem wih logging setup apring webapp deployed underneath tomcat 6.



the webapp uses commons-logging api, runtime log4j should used. record record combined nonetheless stays lifeless - record entries occur.



the setup following:



web-inf/web.xml:



 <context-param>
<param-name>log4jconfiglocation</param-name>
<param-value>/web-inf/log4j.xml</param-value>
</context-param>
<listener>
<listener-class>org.springframework.web.util.log4jconfiglistener</listener-class>
</listener>


web-inf/classes/commons-logging.properties:



org.apache.commons.logging.log=org.apache.commons.logging.impl.log4jlogger


web-inf/log4j.xml:



<log4j:configuration xmlns:log4j='http://jakarta.apache.org/log4j/'>

<appender name="console" class="org.apache.log4j.consoleappender">
...
</appender>
<appender name="file" class="org.apache.log4j.rollingfileappender">
<param name="file" value="${catalina.home}/logs/my.log"/>
...
</appender>

<logger name="my.package">
<level value="info"/>
</logger>

<root>
<level value="error"/>
<appender-ref ref="console"/>
<appender-ref ref="file"/>
</root>
</log4j:configuration>


the record logs/my.log created, nonetheless logs appear. info logs tomcat console, nonetheless plans settlement configured.



the commons-logging-1.1.1.jar log4j-1.2.14.jar enclosed web-inf/lib. any thought wrong here?



Comments

Popular posts from this blog

list macos calm editors formula editors

how i practical urls indicate .aspx pages asp.net deployed an iis? (preferably but iis)

jaxb - xjc - reworking generated typesafe enum category members