Hi,
I seem to have a problem configuring hibernate and the output for logging messages. For the time being, all hibernate messages appear in the standard output (System.out). I do not want this to happen, instead, I want them stored in a file (eg. hibernate.log). My log4j. properties file looks like the following:
Code:
log4j.logger.org.hibernate=ALL, db
log4j.appender.db=org.apache.log4j.RollingFileAppender
log4j.appender.db.file=${catalina.home}/logs/hibernate.log
log4j.appender.db.maxFileSize=1MB
log4j.appender.db.maxBackupIndex=25
log4j.appender.db.layout=org.apache.log4j.PatternLayout
log4j.appender.db.layout.conversionPattern=%d{MMM dd HH:mm:ss} %-5p (%F:%L) - %m%n
The log file created though, remains empty. What am I doing wrong here? Am I missing some other configuration needed?
Thanks in advance,
Argyro