-->
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.  [ 4 posts ] 
Author Message
 Post subject: Hibernate ORM 4.3.7 Logging issue
PostPosted: Mon Jan 12, 2015 4:57 pm 
Newbie

Joined: Mon Jan 12, 2015 4:45 pm
Posts: 4
Please, Help i'm not able to configure hibernate logging at all
I tried to put log4j.properties in the same path of hibernate.cfg.xml but it didn't work.

Is there any parameter must be set in code to force hibernate to use the provided logging file.

Here is log4j.properties content
log4j.appender.file=org.apache.log4j.RollingFileAppender
log4j.appender.file.File=E:/WorkSpaces/EclipseHelios/ws/HibernateTest/abc.log
log4j.appender.file.MaxFileSize=1MB
log4j.appender.file.MaxBackupIndex=1
log4j.appender.file.layout=org.apache.log4j.PatternLayout
log4j.appender.file.layout.ConversionPattern=%d{ABSOLUTE} %5p %c{1}:%L - %m%n


log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.Target=System.out
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
log4j.appender.stdout.layout.ConversionPattern=%d{ABSOLUTE} %5p %c{1}:%L - %m%n

log4j.rootLogger=ERROR, file, stdout

log4j.logger.org.hibernate=ERROR

log4j.logger.org.hibernate.type=ERROR


Top
 Profile  
 
 Post subject: Re: Hibernate ORM 4.3.7 Logging issue
PostPosted: Tue Jan 20, 2015 12:06 am 
Newbie

Joined: Mon Jan 12, 2015 3:56 am
Posts: 5
Maybe Hibernate just doesn't log anything at ERROR level? )

What log libraries have you in classpath?


Top
 Profile  
 
 Post subject: Re: Hibernate ORM 4.3.7 Logging issue
PostPosted: Thu Jan 22, 2015 9:33 am 
Newbie

Joined: Mon Jan 12, 2015 4:45 pm
Posts: 4
Thanks astafev for your reply.

It works fine with me after using "jboss-logging 3.2.0.Final" instead of using the default hibernate one "jboss-logging-3.1.3.GA.jar"


Top
 Profile  
 
 Post subject: Re: Hibernate ORM 4.3.7 Logging issue
PostPosted: Thu Jan 22, 2015 9:34 am 
Newbie

Joined: Mon Jan 12, 2015 4:45 pm
Posts: 4
"jboss-logging 3.2.0.Final" works fine with Log4j2.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 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.