4 Replies Latest reply on Oct 2, 2014 10:56 PM by Benjamin Hundley

    Support for slf4j in EAP 6.3?

    Benjamin Hundley Newbie

      I'm pretty confused about the issue of logging in JBoss EAP 6.3.  Does JBoss EAP 6.3 provide built in support for sl4j?  I read that JBoss 6.3 has changed it's logging and has moved from log4j to a proprietary logging system.  I'm trying to write a web application that uses slf4j with log4j underneath. 

       

      The Current state of my application is:

       

      • slf4j and log4j jar files in my WEB-INF lib folder
      • log4j.xml is in my classes folder
      • jboss-deployment-structure.xml is in my WEB-INF folder and contains the following:

       

      <jboss-deployment-structure>

        <deployment>

          <exclusions>

              <module name="org.apache.log4j" />

              <module name="org.apache.commons.logging" />

              <module name="org.slf4j"/>

          </exclusions>

        </deployment>

      </jboss-deployment-structure>

       

      • I'm starting my JBoss server with the command line:  -Dorg.jboss.as.logging.per-deployment=false

       

      This seems to work for the most part but I'm not happy that my log files are in my bin directory instead of standalone\log.  Also I think this solution requires me to bounce the server if I want to change my logging level say from INFO to DEBUG.  And the fact that I have to exclude org.slf4j in the jboss-deployment-structure makes me think that maybe slf4j is already built into JBoss and I'm not taking advantage of it.

       

      Could someone tell me if there is a better way to implement slf4j in JBoss EAP 6.3?