7 Replies Latest reply on Jul 5, 2006 11:37 AM by theute

    Enable Seam Debug Logging

    nkopp

      How do I enable debug logging in Seam?

      I am trying to run Seam from within JDeveloper 10.1.3 (with a standard from-the-wizard JDeveloper JSF web application) with the embedded OC4J server, but it's not working. I'm basically following the instructions found here: http://weblogs.java.net/blog/bleonard/archive/2006/05/trying_out_jbos.html and here: http://docs.jboss.com/seam/1.0.0.GA/reference/en/html/configuration.html#d0e4616

      When I get to step 4 (from the first link), my web application is basically disabled... trying to access a JSP page yeilds a null response from the web server. I get no error messages in any output that I could find (nothing to stderr). If there are logs being generated, I don't know where they are.

      Anyway, I was looking at the Seam source code and noticed a lot of debug logging. I figured if I could enable the debug logging, I could track down the problem and get things working.

      Thanks for any help you can offer with this.

      -Nathan

        • 1. Re: Enable Seam Debug Logging
          bfo81

          That would be interesting to me, too. *bump* ;).

          • 2. Re: Enable Seam Debug Logging
            pmuir

            By default JBoss logs to $JBOSS_HOME/server/default/log/server.log . By default it logs Seam debug messages.

            Or are you not using JBoss?

            • 3. Re: Enable Seam Debug Logging
              bfo81

              Tomcat 5.5 with Eclipse. I can see the log in my Eclipse console, but it's only INFO and WARN.

              • 4. Re: Enable Seam Debug Logging
                pmuir

                I don't know anything about Tomcat, sorry. But you'll need to find out where it logs to (what you get in eclipse is the console output which is typically less verbose than the log) and, then, if there are no debug messags from Seam, adjust the Tomcat log configuration so that they do appear.

                • 5. Re: Enable Seam Debug Logging

                  I have no idea how tomcat directly on eclipse works, but in JBoss you can adust log levels in the conf/log4j.xml file. What you see as output from JBoss is the console log, and is filtered to show only INFO/WARN. What you see in log/server.log is every log message that isn't filtered out by a category setting.

                  If you are running outside of the app server, you probably just need to make a log4j.xml or log4j.properties file available on your classpath. (I would assume tomcat standalone has one of these already) But then again, why not just run in the appserver where you get logging (and deployment, and management, etc...) provided to you for free.

                  • 6. Re: Enable Seam Debug Logging
                    nkopp

                    I'm deploying to the JDeveloepr's built-in OC4J container. Does SEAM use log4j? I looked in its code and it appears to be using jboss logging (which I guess might be using log4j under the covers). If so, what specific settings do I need in my log4j config file in order to get the system to spit out seam debug logs?

                    • 7. Re: Enable Seam Debug Logging
                      theute

                      Yes it's using log4j under the cover,

                      <category name="org.jboss.seam">
                       <priority value="TRACE"/>
                      </category>
                      


                      Will let you have info down to TRACE mode (TRACE, DEBUG, INFO, WARN, ERROR)