通过查看 Open JPA 网站,我发现可以使用以下方法记录生成的 SQL:
<property name="openjpa.Log" value="DefaultLevel=WARN, Runtime=INFO, Tool=INFO"/>
如果我尝试将上述属性添加到我的persistence.xml中,我会收到来自Weblogic的以下警告:
<Warning> <J2EE> <BEA-160202> <You have specified a ope
njpa.Log setting in your configuration for persistence unit services.ear#services-ejb.jar#exp#exp. This setting will be ignored, and all log messages
will be sent to the WebLogic logging subsystem. Trace-level logging is controlle
d by the various JPA-specific debug settings in config.xml, or via the WebLogic
console.>
有人知道在控制台中的选项或我如何编辑我的config.xml以输出SQL吗?