In OpenShift I want to set the log level of JBoss AS to "DEBUG".

In my local JBoss installation I can achieve this by editing the logging configuration in JBOSS_HOME/standalone/configuration/standalone.xml.

The default level of the root-logger is "INFO", but when I set that to "DEBUG" and restart JBoss, then I have achieved my goal.

How can I acheve the same in OpenShift? I can SSH into the OpenShift App and manually modify jbossas/standalone/configuration/standalone.xml. However when I restart the App, all those changes are lost, and consequently the level of the root-logger is reset to "INFO".

有帮助吗?

解决方案

If you want this settings to be permanent you should add something to *.openshift/action_hooks/deploy* which applies this setting during deploy of the application. The hook is part of the git repo, so you can modify it locally and it gets executed during deployment. See also https://www.openshift.com/developers/deploying-and-building-applications.

You could use a perl one lines to do the modification. Something like this should do:

perl -p -i -e 's/<level name=\"INFO\"\/>/<level name=\"DEBUG\"\/>/g' <path-tp-standalone-xml>
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top