4 Replies Latest reply on Dec 4, 2007 3:07 AM by Gerhard Balthasar

    SEAM Logger issue

    P C Newbie

      Hi All,

      I am trying to use the SEAM Logger, but it doesn't seem to work. Are there any special configurations that I need to do? Here is what I have done so far to enable logging for my application:

      1) Declare "@Logger private Log log;" in my stateless session bean
      2) use log.debug(...)

      Do I need log4.properties in WEB-INF/classes/ for it to work? I assume it logs to server.log or the console by default in jboss.

      If anyone can shed some light on this it would be great!

      Thanks

      Paul

        • 1. Re: SEAM Logger issue
          P C Newbie

          I am using JBoss 4.2.1 ...according to the release notes:

          conf/log4j.xml has been renamed to conf/jboss-log4j.xml, to allow log4j.properties override from scoped deployments

          Does this mean that log4j.properties in my application will be automatically loaded?

          • 2. Re: SEAM Logger issue
            Gerhard Balthasar Newbie

            If you are using JBoss out-of-the box, use

            log.info(...)


            to show some output. You need to change the scope to debug mode in jboss-log4j.xml to see Loggers debug output.

            Greetz GHad

            • 3. Re: SEAM Logger issue
              P C Newbie

              My understanding is that you can configure your log4j settings in log4j.properties under (myapp)/WEB-INF/classes and then jboss 4.2.1 would automatically read it. Is this incorrect? Do I have to do something special in jboss-log4j.xml to make it load log4j.properties in my app?

              Here is my log4j.properties file:


              log4j.rootLogger=CONSOLE,FILE,genesisOut


              log4j.logger.com.genesis=DEBUG

              log4j.appender.genesisOut=org.apache.log4j.DailyRollingFileAppender
              log4j.appender.genesisOut.DatePattern='.'yyyy-MM-dd
              log4j.appender.genesisOut.File=C:\programs\jboss-4.2.1.GA\server\default\log\genesis.log
              log4j.appender.genesisOut.layout=org.apache.log4j.PatternLayout
              log4j.appender.genesisOut.layout.ConversionPattern=%1p %d{MMM-dd HH:mm:ss,SSS} %x %m [%t](%c{3})%n

              What am I doing wrong? I still don't see anything in server.log nor is genesis.log being generated.

              Paul

              • 4. Re: SEAM Logger issue
                Gerhard Balthasar Newbie

                I don't know, sorry... I'm not using a application scoped properties file for log4j settings, instead I have serverwide settings in jboss-log4j.xml

                Greetz GHad