开发者

How to disable Hibernate flooding logs

Hibernate is flooding my IDE console with tons of unnecessary informations at every connection. I alread开发者_开发知识库y read out the documentation and googled trying to solve this issue but till now the problem "persists".

My persistence.xml:


< persistence > 
...
< property name="hibernate.show_sql" value="false" />
< property name="hibernate.use_sql_comments" value="false" />
< property name="hibernate.generate_statistics" value="false" />
...

My log4j.xml:

...
< logger name="org.hibernate" > 
    < level value="NONE" />
    < appender-ref ref="MY_LOG" />
    < appender-ref ref="STDOUT" />
< /logger>
...
I have no other log4j configuration in my project and even in my environment. Anyone there figured out how to disable the Hibernate console logs? Maybe has something I didn´t understand?

I'm using Hibernate 3.5, Tomcat 6.0 and Eclipse 3.3.

Thanks in advance.


I'm not sure if "NONE" is a valid level in log4j (maybe it is). You could try changing the Level to "OFF" (or at least "WARN" or "ERROR").

http://logging.apache.org/log4j/1.2/apidocs/org/apache/log4j/Level.html


I think Tomcat expects a log4j.properties file in WEB-INF/classes. Have you tried converting the .xml to that?


Could also be the Tomcat internal logger, especially if it's logging connection info and select statements.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜