关闭对控制台的休眠日志记录
运行我的Spring/Hibernate应用程序时,我在控制台上看到以下不需要的输出:
Hibernate: select securityus0_.ID ....
Hibernate: select securityus0_.ID ....
Hibernate: select securityus0_.ID ....
Hibernate: select securityus0_.ID ....
我已经配置了我的Log4j记录器,如下所示:
<logger name="org.hibernate">
<level value="FATAL"/>
</logger>
<category name="STDOUT">
<priority value="WARN"/>
</category>
<category name="STDERR">
<priority value="WARN"/>
</category>
<!-- for all other loggers log only info and above log messages -->
<root>
<priority value="WARN"/>
<appender-ref ref="STDOUT" />
</root>
如何将这些消息静音?