如何配置OpenJPA SQL日志记录? [英] How do I configure OpenJPA SQL logging?
本文介绍了如何配置OpenJPA SQL日志记录?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
用于查看数据库中执行的SQL查询的OpenJPA配置是什么?我想查看具有在日志或控制台中执行的所有参数的查询,而不是查看JPQL查询
What is the OpenJPA configuration to view SQL query executed in a database? I would like to view the query with all parameters executed in log or console instead of viewing the JPQL query
推荐答案
<property name="openjpa.Log" value="SQL=Trace" />
启用对所有SQL语句(减去参数值)的记录.
Enables logging of all SQL statements, minus parameter values.
<property name="openjpa.ConnectionFactoryProperties" value="PrintParameters=true" />
启用SQL参数记录.
这篇关于如何配置OpenJPA SQL日志记录?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文