如何在Glassfish 2.1服务器日志中发现我的应用程序异常? [英] How to get caught exceptions of my application in the Glassfish 2.1 server log?
问题描述
客户端通过RMI访问服务器,没有Web客户端。
在Weblogic异常被自动记录到server.log中,即使它们被捕获和重新抛出到客户端。
在Glassfish中,默认情况下我们在server.log中看不到。
如何获得与Weblogic相同的行为?
Glassfish 2.1日志通过java.util.logging。默认情况下,记录内容将收集在
[Glassfish root] / domains / [domain name] /logs/server.log
要配置jul,请找到 logging.properties
文件在用于运行Glassfish(在lib目录中)的JRE中,将您的主题(记录器)级别设置为所需的粒度。
注意:对于使用Apache Commons Logging的应用程序,在Glassfish上运行。
We have ported an EJB application from BEA Weblogic 8.1 to Glassfish 2.1. The client is accessing the server through RMI, no web client.
In Weblogic exceptions were logged automatically to server.log, even when they are catched and rethrown to the client.
In Glassfish with default configuration we can't see them in server.log.
How can I get the same behavior as with Weblogic?
Glassfish 2.1 logs via java.util.logging. Logging content, by default, is collected in
[Glassfish root]/domains/[domain name]/logs/server.log
For configuring j.u.l, find the logging.properties
file in the JRE that is used to run Glassfish (in the lib directory), set your topics' (loggers') levels to desired granularity.
Note: that worked for me for an application using Apache Commons Logging, running on Glassfish.
这篇关于如何在Glassfish 2.1服务器日志中发现我的应用程序异常?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!