JBoss EAP 6.2日志中的System.out.println消息 [英] System.out.println messages in JBoss EAP 6.2 logs
问题描述
我正在部署到JBoss EAP 6.
我的应用程序发出了一些我希望在JBoss控制台上看到的System.out.println
调用.
I am deploying to JBoss EAP 6.
My application is issuing some System.out.println
calls that I would like to see on the JBoss console.
目前,我在该处看不到任何消息.我的WAR有一个logging.properties
文件,其中包含以下内容:
Currently I don't see any messages there. My WAR has a logging.properties
file with the following contents:
org.apache.catalina.session.level=ALL
java.util.logging.ConsoleHandler.level=ALL
org.apache.catalina.core.ContainerBase.[Catalina].level = INFO
org.apache.catalina.core.ContainerBase.[Catalina].handlers = java.util.logging.ConsoleHandler
I need those settings to debug some situations (e.g. like this one) as the output on the JBoss console is too terse otherwise.
但是,当存在logging.properties
文件时,我在JBoss控制台中看不到我的System.out.println
消息.当我从WAR中删除logging.properties
文件时,我可以正常看到它们.
However, when the logging.properties
file is present I don't see my System.out.println
messages in JBoss console. When I remove the logging.properties
file from the WAR I see them normally.
那是为什么?我的logging.properties
文件有什么问题,导致我的System.out.println
消息无法显示在JBoss控制台中?
Why is that? What is wrong with my logging.properties
file that prevents my System.out.println
messages to show up in JBoss console?
推荐答案
I actually ended up posting this to developer.jboss.org in this thread. TL;DR is that configuring logging be means of a configuration file bundled with your WAR deployment is horribly broken and undocument in JBoss 6.x. Apparently the only supported method (that's reasonably well documented) is to configure logging on the server side. The latter does seem to work fine.
这篇关于JBoss EAP 6.2日志中的System.out.println消息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!