[英]OpenShift: How to set the log-level of JBoss AS
In OpenShift I want to set the log level of JBoss AS to "DEBUG". 在OpenShift中,我想将JBoss AS的日志级别设置为“ DEBUG”。
In my local JBoss installation I can achieve this by editing the logging configuration in JBOSS_HOME/standalone/configuration/standalone.xml
. 在本地JBoss安装中,可以通过在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. 根记录器的默认级别是“ INFO”,但是当我将其设置为“ DEBUG”并重新启动JBoss时,我已经实现了我的目标。
How can I acheve the same in OpenShift? 如何在OpenShift中达到相同的目的? I can SSH into the OpenShift App and manually modify jbossas/standalone/configuration/standalone.xml
. 我可以通过SSH进入OpenShift应用并手动修改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". 但是,当我重新启动该应用程序时,所有这些更改都将丢失,因此根记录程序的级别将重置为“ 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. 如果您希望此设置为永久设置,则应在* .openshift / action_hooks / deploy *中添加一些内容,以便在应用程序部署期间应用此设置。 The hook is part of the git repo, so you can modify it locally and it gets executed during deployment. 该钩子是git repo的一部分,因此您可以在本地对其进行修改,并在部署期间执行该钩子。 See also https://www.openshift.com/developers/deploying-and-building-applications . 另请参阅https://www.openshift.com/developers/deploying-and-building-applications 。
You could use a perl one lines to do the modification. 您可以使用perl一行来进行修改。 Something like this should do: 这样的事情应该做:
perl -p -i -e 's/<level name=\"INFO\"\/>/<level name=\"DEBUG\"\/>/g' <path-tp-standalone-xml>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.