我的 Java EE 6 应用程序使用带有 logback 的 slf4j 作为日志框架。我有 openjpa 自定义日志记录,它在 Weblogic 上不起作用,而之前在 glassfish 上没问题(使用 openjpa 1.2)。当我将自定义日志工厂添加到 persistence.xml 中的“openjpa.log”属性时,weblogic 会忽略这一点并且不起作用。
我的自定义日志工厂:
<property name="openjpa.Log" value="com.kishware.core.log.openjpa.CustomSLF4JLogFactory"/>
这是忽略该属性时的 weblogic 控制台输出:
<Aug 17, 2013 11:29:35 AM GMT+04:30> <Warning> <J2EE> <BEA-160202> <You have specified a openjpa.Log setting in your configuration for persistence unit banco-product#pu-channel-manager. This setting will be ignored and all log messages will be sent to the WebLogic Server logging subsystem. Trace-level logging is controlled by the various JPA-specific debug settings in config.xml, or through the WebLogic Server Administration Console.>
我应该提到我正在使用 JPA 2.1 和 Toplink 实现。我很乐意得到一些提示,如何解决这个问题。