gpt4 book ai didi

hibernate - 修复来自 Hibernate 的警告

转载 作者:行者123 更新时间:2023-12-04 07:09:45 25 4
gpt4 key购买 nike

我目前正在研究 Hibernate 项目。我当前的开发设置在启动时有一个相当长的调试打印输出,来自很多 hibernate 警告。
我想把它清理干净。

2009-02-18 09:14:19 org.hibernate.util.JDBCExceptionReporter logWarnings WARNING: [Microsoft][SQLServer 2000 Driver for JDBC][SQLServer]Changed language setting to us_english.



我该如何解决这个问题?谷歌无法给我答案

2009-02-18 09:14:19 org.hibernate.util.JDBCExceptionReporter logWarnings WARNING: SQL Warning: 0, SQLState:



这个我不明白。谁能解释一下?

2009-02-18 09:48:36 org.hibernate.util.JDBCExceptionReporter logWarnings WARNING: [Microsoft][SQLServer 2000 Driver for JDBC][SQLServer]Changed database context to 'bess_test'.



我如何指定数据库,以避免这种情况?

最佳答案

以后当您想为 Hibernate 的特定部分打开日志记录时,您可能会发现这很有用。此配置还应隐藏您看到的警告。

# Hibernate logging
# Log everything (a lot of information, but very useful for troubleshooting)
log4j.logger.org.hibernate=FATAL
# Log all SQL DML statements as they are executed
log4j.logger.org.hibernate.SQL=INHERITED
# Log all JDBC parameters
log4j.logger.org.hibernate.type=INHERITED
# Log all SQL DDL statements as they are executed
log4j.logger.org.hibernate.tool.hbm2ddl=INHERITED
# Log the state of all entities (max 20 entities) associated with the session at flush time
log4j.logger.org.hibernate.pretty=INHERITED
# Log all second-level cache activity
log4j.logger.org.hibernate.cache=INHERITED
# Log all OSCache activity - used by Hibernate
log4j.logger.com.opensymphony.oscache=INHERITED
# Log transaction related activity
log4j.logger.org.hibernate.transaction=INHERITED
# Log all JDBC resource acquisition
log4j.logger.org.hibernate.jdbc=INHERITED
# Log all JAAS authorization requests
log4j.logger.org.hibernate.secure=INHERITED

关于hibernate - 修复来自 Hibernate 的警告,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/560235/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com