-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: Can't turn off hibernate info logging
PostPosted: Mon Dec 26, 2011 6:50 pm 
Newbie

Joined: Sun Oct 30, 2011 5:43 am
Posts: 13
i am using log4j and my configuration is as follows:

Code:
log4j.rootLogger=OFF, stdout, rootLog
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout

# Pattern to output the caller's file name and line number.
log4j.appender.stdout.layout.ConversionPattern=%5p [%t] (%F:%L) - %m%n

log4j.appender.rootLog=org.apache.log4j.RollingFileAppender
log4j.appender.rootLog.File=${user.home}/logs/mylog.log
log4j.appender.rootLog.MaxFileSize=10000KB
log4j.appender.rootLog.MaxBackupIndex=3
log4j.appender.rootLog.layout=org.apache.log4j.PatternLayout
log4j.appender.rootLog.layout.ConversionPattern=%p %t %c - %m%n

# Control/Limit integrated frameworks logging messages

log4j.logger.org.hibernate=OFF
log4j.logger.org.springframework=OFF


although i am turning off the root logger and the hibernate logging

i am still seeing info in the console from:

Code:
2099 [main] INFO org.hibernate.cfg.SettingsFactory
2440 [main] INFO org.hibernate.tool.hbm2ddl.SchemaExport
3239 [main] WARN org.hibernate.util.JDBCExceptionReporter

logging jars/dependencies:

Code:
<dependency>
         <groupId>org.slf4j</groupId>
         <artifactId>slf4j-simple</artifactId>
         <version>1.5.8</version>
        </dependency>



        <dependency>

            <groupId>log4j</groupId>
            <artifactId>log4j</artifactId>
            <version>1.2.15</version>
            <exclusions>
             <exclusion>
             <groupId>com.sun.jdmk</groupId>
             <artifactId>jmxtools</artifactId>
            </exclusion>
            <exclusion>
             <groupId>com.sun.jmx</groupId>
             <artifactId>jmxri</artifactId>
            </exclusion>
          </exclusions>

        </dependency>


how to stop that info logging, please advise, thanks.


Top
 Profile  
 
 Post subject: Re: Can't turn off hibernate info logging
PostPosted: Thu Dec 29, 2011 5:53 am 
Beginner
Beginner

Joined: Tue Aug 16, 2005 3:44 pm
Posts: 33
msaleh wrote:
how to stop that info logging, please advise, thanks.


Hi :)

You might find some usefull ideas on http://stackoverflow.com/questions/8627 ... fo-logging


-Kaj :)


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.