Hello
I'm creating a desktop application with hibernate. Everything goes great except of logging. I configured log4j and use simplest log4j.properties file:
Code:
### direct log messages to stdout
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 %5p %c{1}:%m%n
### set log levels - for more verbose logging change
### 'info' to 'debug'
log4j.rootLogger=fatal, stdout
log4j.logger.org.hibernate=fatal
According to documentation this should make log4j to show only fatal messages ("lowest console noise"), bu everytime my application do something I see messages like this:
Code:
[java] Hibernate: select device0_.deviceId as deviceId2_, device0_.version as version2_, device0_.name as name2_, device0_.description as descript4_2_ from Device device0_ order by device0_.name
...
[java] Hibernate: insert into PictureSection (pictureSectionId, version, numberOf, sourceSectionId, pictureId) values (null, ?, ?, ?, ?)
[java] Hibernate: call identity()
which are regular processing messages (not fatal). I'm posting this to hibernate forum (not log4j forum) because after I switched to native java logging (by deleting jar and properties files). I still see those messages.
I don't want to application user to see those messages (each time when hibernate do something with database) and It slows down processing.