log « cfg « JPA Q&A





1. Unable to stop logging of org.hibernate.cfg    forum.hibernate.org

I'm using dbunit, junit, spring 3, hibernate 3, maven I'm able to configure my log4j.xml file to stop the logging for the other frameworks such as org.springframework. But nothing I do works for these hibernate logs for cfg, object mappings, etc. I've added sl4j-log4j into my classpath (based on other posts), but when I run the tests I still get all ...

2. hibernate.cfg.xml Log LEVEL    forum.hibernate.org

sounded quite good but it does not work. Into the body I have only nodes and . And if a I add the node you suggested me: i get the error Caused by: org.hibernate.MappingException: invalid configuration at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1369) at org.hibernate.cfg.Configuration.configure(Configuration.java:1310) at org.hibernate.cfg.Configuration.configure(Configuration.java:1296) at com.s21sec.polite.simpleserveur.HibernateUtil.(HibernateUtil.java:14) ... 1 more Caused ...

3. Set logging in hibernate.cfg.xml    forum.hibernate.org

this is probably something you already thought about, but I use something like this when I debug to get rid of some of the noise. log4j.logger.org.hibernate=WARN log4j.logger.org.hibernate.SQL=DEBUG You could just filter out the specific classes, even though it's for the whole server. log4j.logger.org.hibernate.cfg.HbmBinder=WARN It's not a perfect solution. Maybe someone else can give you a better answer then this.