通过查看Open JPA网站,我发现我可以使用以下命令记录生成的SQL:
<property name="openjpa.Log" value="DefaultLevel=WARN, Runtime=INFO, Tool=INFO"/>
Run Code Online (Sandbox Code Playgroud)
如果我尝试将上述属性添加到我的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.>
Run Code Online (Sandbox Code Playgroud)
任何人都知道控制台中的选项是什么,或者我如何编辑config.xml以输出SQL?