jboss7.x - Just so you know: Per deployed webapp SLF4J & Logback in JBoss 7.1.1 -


until jboss team support per deployment slf4j logging can webapps:

  • put logback.xml in src/main/resources/ (or web-inf/classes/ non-maven2 projects):

    <configuration scan="true" scanperiod="3 seconds" debug="true">     <contextname>[webappname]</contextname>     <include file="/opt/jboss/includedconfig.xml"/> </configuration> 

    the includedconfig.xml can modified @ runtime saves redeployments logging changes

  • put jboss-deployment-structure.xml in web-inf:

    <jboss-deployment-structure>     <deployment>         <exclusions>             <module name="org.apache.commons.logging"/>             <module name="org.apache.log4j"/>             <module name="org.jboss.logging"/>             <module name="org.jboss.logging.jul-to-slf4j-stub"/>             <module name="org.jboss.logmanager"/>             <module name="org.jboss.logmanager.log4j"/>             <module name="org.slf4j"/>         </exclusions>     </deployment> </jboss-deployment-structure> 

    you need exclude commons-logging & log4j if you're including jcl-over-slf4j & log4j-over-slf4j


Comments

Popular posts from this blog

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -

php - Controller/JToolBar not working in Joomla 2.5 -