-->
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: log4j issue with hibernate 3.0
PostPosted: Wed Apr 20, 2005 4:48 pm 
Beginner
Beginner

Joined: Fri Feb 27, 2004 11:47 am
Posts: 24
it's not writing to hibernate.log, please find out if there is any fault in properties configuration

Hibernate version: 3.0

Mapping documents:

Code between sessionFactory.openSession() and session.close():

Full stack trace of any exception that occurs:

Name and version of the database you are using:

The generated SQL (show_sql=true):hibernate.show_sql true

Debug level Hibernate log excerpt:

log4j.configDebug=FALSE
log4j.debug=FALSE

log4j.rootLogger=ERROR, CONSOLE, FILE

#If you set the "additivity" to false for "x.y", its log messages will not end up in the log for "x".
log4j.logger.org.hibernate=DEBUG, HIBERNATE
log4j.additivity.org.hibernate=false
# or you can set HIBERNATE.additivity = false

log4j.logger.abc.runtime.db=DEBUG, DB
log4j.additivity.abc.runtime.db=false

log4j.logger.abc.runtime.ActionServlet=DEBUG

log4j.logger.http.redirect=INFO
log4j.logger.http.request=INFO
log4j.logger.http.parameter=INFO
log4j.logger.http.header=INFO
log4j.logger.http.session=INFO

pattern=%p [%d] [%t] %c{3} %-5r %m%n

log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender
log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout
log4j.appender.CONSOLE.layout.ConversionPattern=${pattern}


log4j.appender.HIBERNATE=org.apache.log4j.RollingFileAppender
log4j.appender.HIBERNATE.File=srd_hibernate.log
#log4j.appender.HIBERNATE.MaxFileSize=1000KB
#log4j.appender.HIBERNATE.MaxBackupIndex=1
log4j.appender.HIBERNATE.Append=false
log4j.appender.HIBERNATE.layout=org.apache.log4j.PatternLayout
log4j.appender.HIBERNATE.layout.ConversionPattern=${pattern}

log4j.appender.FILE=org.apache.log4j.RollingFileAppender
log4j.appender.FILE.File=abc.log
log4j.appender.FILE.MaxFileSize=1000KB
log4j.appender.FILE.MaxBackupIndex=1
log4j.appender.FILE.Append=false
log4j.appender.FILE.layout=org.apache.log4j.PatternLayout
log4j.appender.FILE.layout.ConversionPattern=${pattern}

log4j.appender.DB=org.apache.log4j.RollingFileAppender
log4j.appender.DB.File=abc_picklist.log
log4j.appender.DB.MaxBackupIndex=1
log4j.appender.DB.MaxFileSize=1000KB
log4j.appender.DB.Append=false
log4j.appender.DB.layout=org.apache.log4j.PatternLayout
log4j.appender.DB.layout.ConversionPattern=${pattern}


### direct messages to file hibernate.log ###
#log4j.appender.file=org.apache.log4j.RollingFileAppender
#log4j.appender.file.File=hibernate.log
#log4j.appender.file.layout=org.apache.log4j.PatternLayout
#log4j.appender.file.layout.ConversionPattern=%d{ABSOLUTE} %5p %c{1}:%L - %m%n




### log just the SQL
#log4j.logger.org.hibernate.SQL=debug

### log JDBC bind parameters ###
#log4j.logger.org.hibernate.type=info
#log4j.logger.org.hibernate.type=debug

### log schema export/update ###
#log4j.logger.org.hibernate.tool.hbm2ddl=debug

### log HQL parse trees
#log4j.logger.org.hibernate.hql=debug

### log cache activity ###
#log4j.logger.org.hibernate.cache=debug

### log JDBC resource acquisition
#log4j.logger.org.hibernate.jdbc=debug

### enable the following line if you want to track down connection ###
### leakages when using DriverManagerConnectionProvider ###
#log4j.logger.org.hibernate.connection.DriverManagerConnectionProvider=trace3

_________________
Web Developer


Top
 Profile  
 
 Post subject:
PostPosted: Wed Apr 20, 2005 6:05 pm 
Beginner
Beginner

Joined: Fri Aug 06, 2004 9:01 am
Posts: 21
While we are on the topic of setting the Hibernate Appender in Log4j, what do you need to set in the Log4j XML file? I've only see examples of the properties configuration, not XML.

Sorry I couldn't help, I kept my config XML based...so never used the Hibernate Appender.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Apr 20, 2005 6:15 pm 
Hibernate Team
Hibernate Team

Joined: Mon Aug 25, 2003 9:11 pm
Posts: 4592
Location: Switzerland
There is no Hibernate appender. Hibernate uses commons logging, hence this question should be asked in the Log4j groups.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Apr 20, 2005 8:26 pm 
Beginner
Beginner

Joined: Fri Aug 06, 2004 9:01 am
Posts: 21
Christian:

Ja, I guess I got confused by this...which is an implementation to interface with log4j...not something that is included with Hibernate.

http://www.hibernate.org/97.html

Thanks for the clarification! ;)


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.