System.out.println messages in JBoss EAP 6.2 logs

2019-09-19 05:43发布

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.

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.

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.

Why is that? What is wrong with my logging.properties file that prevents my System.out.println messages to show up in JBoss console?

标签: logging jboss
1条回答
淡お忘
2楼-- · 2019-09-19 06:36

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.

查看更多
登录 后发表回答