与Glassfish 3.0.1和NetBeans 6.9.1的JPA 2.0(记录和跟踪) [英] JPA 2.0 (logging and tracing through) with Glassfish 3.0.1 and NetBeans 6.9.1:

查看:142
本文介绍了与Glassfish 3.0.1和NetBeans 6.9.1的JPA 2.0(记录和跟踪)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用 Glassfish v3.0.1 NetBeans 6.9.1 使用 JPA 2.0 EclipseLink 提供程序)并且无法从JPA 2.0中查看查询和其他日志记录信息。本质上,我希望能够看到由JPA生成的所有SQL语句和其他相关的调试信息...



有没有人成功地配置了日志记录提供这样的反馈?我尝试了几件事情无济于事。



任何帮助都将不胜感激。



非常感谢

解决方案

最终对我做的诀窍是使用:

 < property name =eclipselink.logging.logger
value =org.eclipse.persistence.logging.DefaultSessionLog/>

您的推荐标签为:

 < property name =eclipselink.logging.levelvalue =FINE/>  / pre>这让我看到NetBeans输出窗口中的相关JPA日志。这也在Eclipse中工作。输出被发送到控制台窗口与服务器的输出混合,这正是我想要的。


I am using JPA 2.0 (EclipseLink provider) with Glassfish v3.0.1 and NetBeans 6.9.1 and am NOT able to see the queries and other logging information from JPA 2.0. Essentially I want to be able to see all the SQL statements which are being generated by JPA and other related debugging information...

Has anyone successfully been able to configure the logging to provide such feedback? I've tried several things to no avail...

Any help would be greatly appreciated.

Thanks much.

解决方案

What eventually had done the trick for me was using:

<property name="eclipselink.logging.logger"
     value="org.eclipse.persistence.logging.DefaultSessionLog"/>

in conjunction with your recommended tag of:

<property name="eclipselink.logging.level" value="FINE" />

This allowed me to see the relevant JPA logs which in NetBeans output window. This also worked in Eclipse. The output was sent do the console window an intermingled with the server's output which was exactly what I wanted.

这篇关于与Glassfish 3.0.1和NetBeans 6.9.1的JPA 2.0(记录和跟踪)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆