Glassfish3 中的应用程序日志记录

发布于 2025-01-05 07:11:01 字数 461 浏览 3 评论 0原文

我已将应用程序从 Tomcat 迁移到 Glassfish,以便利用应用程序服务器功能。

除了日志记录之外,一切正常。在调试模式下,我可以在服务器日志中看到日志条目,但在正常操作中没有任何内容。

我在默认配置和域配置 logging.properties 中添加了一行(通过 Glassfish 管理应用程序)。有问题的行是 ch.sertal.level=FINE

每个类定义记录器的方式都是相同的:

private Logger log = Logger.getLogger(getClass().getName());

包总是以 ch.sertal 开头

我使用 maven 进行依赖管理,并且有pom.xml 中没有日志记录依赖项。我假设项目编译正常时提供了库。

接下来我应该去哪里检查?

感谢您的帮助 :-)

I have migrated an application from Tomcat to Glassfish in order to take advantage of the Application server functionalities.

It all works fine except for logging. In debug mode, I can see the log entries in the server log but in normal operation there is nothing.

I have added a line (via the Glassfish Admin app) to both default-config and domain-config logging.properties. The line in question is ch.sertal.level=FINE

The way the loggers are defined is the same for every class:

private Logger log = Logger.getLogger(getClass().getName());

The package always starts with ch.sertal

I use maven for the dependency management and there is no Logging dependency in the pom.xml. I assume the libraries are provided as the project compiles OK.

Where should I check next?

Thank you for your help :-)

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

一腔孤↑勇 2025-01-12 07:11:01

我的错是,logging.properties 中的行

com.sun.enterprise.server.logging.GFFileHandler.level=INFO

com.sun.enterprise.server.logging.GFFileHandler.level=OFF

明显它不会记录任何内容。

My bad, the row in logging.properties

com.sun.enterprise.server.logging.GFFileHandler.level=INFO

was

com.sun.enterprise.server.logging.GFFileHandler.level=OFF

so obviously it would not log anything.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文