2 Replies Latest reply on Aug 3, 2003 7:14 AM by juhalindfors

    How to log SQL generated statement ?

    ansarim

      Hi,
      i have an error in the Create() method of my entity bean (an SQL error) and i would like to know the SQL statement generated.
      I find out that you can log each statement by configuring the log4j.xml - what lines do i have to insert ?

      Is there anything to do with the standardjaws.xml ?

      thanks a lot

        • 1. Re: How to log SQL generated statement ?

          Uncomment the following lines in your log4j.xml

           <!-- Limit JBoss categories to INFO
           <category name="org.jboss">
           <priority value="INFO"/>
           </category>
           -->
          
           <!-- Decrease the priority threshold for the org.jboss.varia category
           <category name="org.jboss.varia">
           <priority value="DEBUG"/>
           </category>
           -->
          


          Additionally also limit org.apache category to INFO. Make sure your appender (CONSOLE or FILE) has threshold set to DEBUG depending on where you want to log the SQL statements.

          -- Juha


          • 2. Re: How to log SQL generated statement ?

            The 'org.jboss.varia' category should have been 'org.jboss.ejb.plugins.cmp'.

            -- Juha