简体   繁体   English

OpenShift:如何设置JBoss AS的日志级别

[英]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.

相关问题 隐藏Winston日志中的日志级别 - Hiding log-level in Winston logs 通过模拟更改日志级别 - Change log-level via mocking 为什么我的gunicorn进程忽略了Django的日志级别设置? - Why is my gunicorn process ignoring the log-level setting with Django? docker 日志级别会影响日志驱动程序还是仅影响 docker 守护进程的日志? - Does docker log-level impact logging driver or only logs of docker daemon? 支持条件函数调用的C / C ++日志记录工具,具体取决于日志级别 - C/C++ logging facility that supports conditional function calls depending on log-level 如何设置jmxtrans的日志级别 - How to set log level for jmxtrans 在 Jboss AS 7.1 中指定日志级别 - Specify log level in Jboss AS 7.1 Jboss 7,如何在standalone.xml中添加自定义日志级别 - Jboss 7 , How to add a custom log level in standalone.xml host.json 中的 Azure Function 日志级别是否会覆盖 appsettings-file 日志级别和 Application insight 日志级别? - Does Azure Function log-level in host.json overwrite appsettings-file loglevel and Application insight loglevel? 如何更改JBoss EAP 7日志中打印的日志级别标识符? - How can I change the log level identifier printed out in JBoss EAP 7 log?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM