4 Replies Latest reply on Jul 25, 2006 10:02 AM by Rikard Eriksen

    Excessive logging to server.log

    Rikard Eriksen Newbie

      Hi!
      I posted this over in the hibernate forums as well, but maybe it belongs here. My hibernate classes keep logging excessive amounts of data to my server.log. My log4j.xml is set to INFO on all entries, but the server.log still contains loads of DEBUG messages. We're talking more than 1 MB an hour, even if the container is "idle". Where is this debug level configured? I can't seem to find it...

        • 1. Re: Excessive logging to server.log
          jaikiran pai Master

           

          My hibernate classes keep logging excessive amounts of data to my server.log


          Can you post a small sample from the server.log?

          My log4j.xml is set to INFO on all entries


          Are you referring to the log4j.xml present in the %JBOSS_HOME%/server/default/conf directory? If not, are you using your own log4j.xml file in your application?

          Also, post the contents of your log4j.xml file.


          • 2. Re: Excessive logging to server.log
            Rikard Eriksen Newbie

             

            "jaikiran" wrote:

            Can you post a small sample from the server.log?

            Here's a small sample:
            2006-07-24 15:24:54,306 DEBUG [org.hibernate.persister.entity.AbstractEntityPersister] Hydrating entity: [no.nsb.eos.domain.Regnskapsmaned#14]
            2006-07-24 15:24:54,306 DEBUG [org.hibernate.type.DateType] returning '10 juli 2006' as column: FRADATO19_
            2006-07-24 15:24:54,306 DEBUG [org.hibernate.type.DateType] returning '10 august 2006' as column: TILDATO19_
            2006-07-24 15:24:54,306 DEBUG [org.hibernate.type.IntegerType] returning '1' as column: STATUS19_
            2006-07-24 15:24:54,306 DEBUG [org.hibernate.type.IntegerType] returning null as column: STATUS5_19_
            2006-07-24 15:24:54,306 DEBUG [org.hibernate.type.IntegerType] returning null as column: STATUS6_19_
            2006-07-24 15:24:54,306 DEBUG [org.hibernate.type.DateType] returning '24 juli 2006' as column: RAPPORT7_19_
            2006-07-24 15:24:54,306 DEBUG [org.hibernate.type.DateType] returning '24 juli 2006' as column: SALDERING8_19_
            2006-07-24 15:24:54,306 DEBUG [org.hibernate.type.BooleanType] returning 'true' as column: AVSLUTTBAR19_
            2006-07-24 15:24:54,307 DEBUG [org.hibernate.type.IntegerType] returning '30' as column: UKENUMMER19_
            2006-07-24 15:24:54,307 DEBUG [org.hibernate.loader.Loader] done processing result set (1 rows)
            2006-07-24 15:24:54,307 DEBUG [org.hibernate.jdbc.AbstractBatcher] about to close ResultSet (open ResultSets: 1, globally: 1)
            2006-07-24 15:24:54,307 DEBUG [org.hibernate.jdbc.AbstractBatcher] about to close PreparedStatement (open PreparedStatements: 1, globally: 1)
            2006-07-24 15:24:54,307 DEBUG [org.hibernate.jdbc.AbstractBatcher] closing statement
            2006-07-24 15:24:54,308 DEBUG [org.hibernate.loader.Loader] total objects hydrated: 1
            2006-07-24 15:24:54,308 DEBUG [org.hibernate.engine.TwoPhaseLoad] resolving associations for [no.nsb.eos.domain.Regnskapsmaned#14]
            2006-07-24 15:24:54,308 DEBUG [org.hibernate.engine.TwoPhaseLoad] done materializing entity [no.nsb.eos.domain.Regnskapsmaned#14]
            2006-07-24 15:24:54,308 DEBUG [org.hibernate.engine.StatefulPersistenceContext] initializing non-lazy collections
            2006-07-24 15:24:54,308 DEBUG [org.hibernate.event.def.AbstractFlushingEventListener] flushing session
            2006-07-24 15:24:54,308 DEBUG [org.hibernate.event.def.AbstractFlushingEventListener] processing flush-time cascades
            2006-07-24 15:24:54,308 DEBUG [org.hibernate.event.def.AbstractFlushingEventListener] dirty checking collections
            2006-07-24 15:24:54,308 DEBUG [org.hibernate.event.def.AbstractFlushingEventListener] Flushing entities and processing referenced collections
            2006-07-24 15:24:54,308 DEBUG [org.hibernate.event.def.AbstractFlushingEventListener] Processing unreferenced collections
            2006-07-24 15:24:54,308 DEBUG [org.hibernate.event.def.AbstractFlushingEventListener] Scheduling collection removes/(re)creates/updates
            2006-07-24 15:24:54,308 DEBUG [org.hibernate.event.def.AbstractFlushingEventListener] Flushed: 0 insertions, 0 updates, 0 deletions to 1 objects
            2006-07-24 15:24:54,308 DEBUG [org.hibernate.event.def.AbstractFlushingEventListener] Flushed: 0 (re)creations, 0 updates, 0 removals to 0 collections
            2006-07-24 15:24:54,308 DEBUG [org.hibernate.pretty.Printer] listing entities:


            "jaikiran" wrote:
            Are you referring to the log4j.xml present in the %JBOSS_HOME%/server/default/conf directory?
            Yes, that's the one. It's rather big, more than 500 lines. But all categories are set to INFO or higher, like this:
            <category name="net.sf.hibernate" additivity="false">
             <priority value="info"/>
             <appender-ref ref="EosAppender"/>
             <appender-ref ref="ConsoleAppender"/>
             </category>
            


            • 3. Re: Excessive logging to server.log
              jaikiran pai Master

               

              <category name="net.sf.hibernate" additivity="false">
               <priority value="info"/>
               <appender-ref ref="EosAppender"/>
               <appender-ref ref="ConsoleAppender"/>
               </category>


              You are using Hibernate-3.x. The package structure of Hibernate-3.x has changed. So your config file should look like:

              <category name="org.hibernate" additivity="false">
               <priority value="INFO"/>
               <appender-ref ref="EosAppender"/>
               <appender-ref ref="ConsoleAppender"/>
               </category>