1 2 Previous Next 16 Replies Latest reply on May 28, 2013 7:09 PM by victorlich Go to original post
      • 15. Re: Log4j setting when using JBoss as 7.1.1.Final
        hantsy

        Hi Victor,

         

        It is very simple,

         

         

        1. create a jboss-deployment-structure.xml under the WEB-INF folder.

         


        <jboss-deployment-structure>
             <deployment>
                  <!-- <dependencies>
                       <module name="org.jboss.logmanager" />
                  </dependencies> -->
                  <exclusions>
                       <module name="org.apache.log4j" />
                       <module name="org.slf4j" />
                  </exclusions>
             </deployment>
        
        </jboss-deployment-structure>
        
        

         

        2. Add the log4j and slf4j into your project denpendencies.

         

        3. Use the sfl4j Logger manually.

         

         

        private static final Logger log=LoggerFactory.getLogger(YourClass.class);
        

         

        You can simple get the config sample codes for before blog entries.

         

        https://github.com/hantsy/seam3-mail-demo
        

         

         

         

        Regards

         

        Hantsy

        • 16. Re: Log4j setting when using JBoss as 7.1.1.Final
          victorlich

          The difference between the projects is that I use "Apache ant" not well "maven", my project is also a war application, maybe my "build.xml" is not well configured

          I'd be very grateful if I could help with that

          1 2 Previous Next