4 Replies Latest reply on Jun 14, 2007 12:52 PM by David Copeland

    Newb: why don't any seam log messages appear in JBoss log?

    David Copeland Newbie

      or, where can I watch seam log messages?

      I'm using JBoss 4.0.5 and Seam 1.2.1

      Used seam-gen to create a new project and "explode" it to JBoss. That works fine, however nothing happens in my JBoss log during this process (if I just manually create a web-app, JBoss indicates it is hot-deploying it, etc.). When I do "generate-entites", my application no longer works (giving me an error page) and I have idea where to start the debugging process (outside of the stack trace on that page). There has to be a log somewhere, right?

      I added "org.jboss.seam" to my JBoss' log4j.xml, but that didn't have any affect, so I'm thinking there is a log somewhere else or I'm missing some vital piece of configuration.

      Thanks!

      Dave

        • 1. Re: Newb: why don't any seam log messages appear in JBoss lo
          Pete Muir Master

          It * should* - I would suggest getting a clean install of jboss and seam and see if it works then...

          • 2. Re: Newb: why don't any seam log messages appear in JBoss lo
            Christian Bauer Master

            Btw, the first thing I do after a JBoss AS install is kick out the jboss-log4j.xml in server/default/conf and replace it with this:

            <?xml version="1.0" encoding="UTF-8"?><!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
            
            <log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/" debug="false">
            
             <appender name="CONSOLE" class="org.apache.log4j.ConsoleAppender">
             <errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/>
             <param name="Target" value="System.out"/>
             <layout class="org.apache.log4j.PatternLayout">
             <!-- The default pattern: Date Priority [Category] Message\n -->
             <param name="ConversionPattern" value="%d{ABSOLUTE} %-5p [%c{1}] %m%n"/>
             </layout>
             </appender>
            
             <!-- ############### Wiki logging ################# -->
             <category name="org.jboss.seam.wiki">
             <priority value="TRACE"/>
             </category>
            
             <!-- ############### Hibernate logging ################# -->
             <category name="org.hibernate">
             <priority value="INFO"/>
             </category>
            
            <!--
             <category name="org.hibernate.ejb.AbstractEntityManagerImpl">
             <priority value="DEBUG"/>
             </category>
             <category name="org.hibernate.loader">
             <priority value="DEBUG"/>
             </category>
             <category name="org.hibernate.cache">
             <priority value="DEBUG"/>
             </category>
             -->
            
             <!-- ############### Seam logging ################### -->
             <category name="org.jboss.seam">
             <priority value="DEBUG"/>
             </category>
            
             <!-- These things are too noisy -->
             <category name="org.jboss.seam.jsf.SeamVariableResolver">
             <priority value="INFO"/>
             </category>
             <category name="org.jboss.seam.contexts.Contexts">
             <priority value="INFO"/>
             </category>
             <category name="org.jboss.seam.Component">
             <priority value="INFO"/>
             </category>
             <category name="org.jboss.seam.deployment.Scanner">
             <priority value="INFO"/>
             </category>
             <category name="org.jboss.seam.core.Events">
             <priority value="INFO"/>
             </category>
             <category name="org.jboss.seam.util.Naming">
             <priority value="INFO"/>
             </category>
             <category name="org.jboss.seam.debug.hot">
             <priority value="INFO"/>
             </category>
            
             <!-- Debugging conversations and persistence contexts
             <category name="org.jboss.seam.core.Manager"><priority value="DEBUG"/></category>
             <category name="org.jboss.seam.core.ManagedPersistenceContext"><priority value="DEBUG"/></category>
             <category name="org.jboss.seam.jsf.AbstractSeamPhaseListener"><priority value="DEBUG"/></category>
             <category name="org.jboss.seam.interceptors.ConversationInterceptor"><priority value="DEBUG"/></category>
             <category name="org.jboss.seam.contexts.Lifecycle"><priority value="DEBUG"/></category>
             <category name="org.hibernate.impl.SessionImpl"><priority value="DEBUG"/></category>
             <category name="org.hibernate.event.def.AbstractFlushingEventListener"><priority value="DEBUG"/></category>
             -->
            
             <root>
             <priority value="INFO"/>
             <appender-ref ref="CONSOLE"/>
             </root>
            
            </log4j:configuration>
            
            



            • 3. Re: Newb: why don't any seam log messages appear in JBoss lo
              Hung Tang Apprentice

              I had this similar problem a week ago, but I could not find my post, but the problem why you may not be seeing any messages is because the CONSOLE appender's threshold is, by default, set to INFO. You'll see something like

               <appender name="CONSOLE" class="org.apache.log4j.ConsoleAppender">
               <errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/>
               <param name="Target" value="System.out"/>
               <param name="Threshold" value="INFO"/>
              
               <layout class="org.apache.log4j.PatternLayout">
               <!-- The default pattern: Date Priority [Category] Message\n -->
               <param name="ConversionPattern"
               value="%d{ABSOLUTE} %-5p [%c{1}] %m%n"/>
               </layout>
               </appender>
              

              Try relaxing the threshold.


              • 4. Re: Newb: why don't any seam log messages appear in JBoss lo
                David Copeland Newbie

                A fresh install of both seemed to work. I'm not sure what I did to the log4j.xml file, but somehow it must've been excluding seam messages.