4 Replies Latest reply on Apr 18, 2010 4:39 AM by jaikiran pai

    slf4j configurarion

    André Dantas Rocha Newbie

      Hello,

      Now that slf4j is used in Hibernate and placed in JBoss commons lib, how do I configure slf4j/logback properly in my application?

      I've tried to pack the libs and logback.xml in my EAR, but nothing happens. The application uses JBoss slf4j configuration.

      Any ideas?

      Thanks in advance,

      Andre

        • 1. Re: slf4j configurarion
          Kevin Pauli Newbie

          Did you ever find out how to configure JBoss 5.1.0.GA to use slf4j rather than log4j?  I have been googling and searching these JBoss forums and docs for an hour now with no luck myself.

           

          I want to use the Eclipse LogBack viewer to capture the logs from a JBoss AS launched via JBoss Tools plugin.

           

          I was hoping to find something in here: http://www.jboss.org/file-access/default/members/jbossas/freezone/docs/Administration_And_Configuration_Guide/5/html_single/index.html

           

          But searching the entire doc for "slf4j" produced no hits

          • 2. Re: slf4j configurarion
            jaikiran pai Master

            I haven't used slf4j, so don't know what it requires to include it in your application. Assuming that it doesn't require any JBoss specific configs or changes, have you tried configuring slf4j within your app? If that did not work out, then can you please explain what specific issues you are running into?

            • 3. Re: slf4j configurarion
              Kevin Pauli Newbie

              The issue I'm running into is that I can't find any decent log viewing plugin for Eclipse that gives color highlighting, filtering, searching, sorting, etc. of log4j logs.  Something like Chainsaw but integrated with Eclipse so that I can click on elements from a stack trace and it will take me to those classes in my code.

               

              The Logback Eclipse plugin looks to do all that, but it is based on slf4j.  So I wanted to configure jboss to use slf4j rather than log4j, mainly just because of the log viewing features I need in my development environment.

               

              The presence of slf4j-api.jar and slf4j-jboss-logging.jar in the common/lib folder of the 5.1.0.GA distribution led me to believe it was possible.  If indeed it is, I'm looking for some configuration instructions, since I haven't the foggiest idea where to begin.

              • 4. Re: slf4j configurarion
                jaikiran pai Master

                Kevin Pauli wrote:

                 

                If indeed it is, I'm looking for some configuration instructions, since I haven't the foggiest idea where to begin.

                Here it is.