简体   繁体   English

Wildfly禁用日志记录子系统

[英]Wildfly disabling logging subsystem

in my web application i need to use my logging framework. 在我的Web应用程序中,我需要使用我的日志框架。 The framework is loaded by each webapplication like a jar dependency. 框架由每个Web应用程序加载,如jar依赖项。

In order to disable jboss logging subsystem i tried to create a 为了禁用jboss日志记录子系统,我试图创建一个

jboss-deployment-structure.xml

file copied in: 文件复制:

(firt try)- webapplication.war\WEB-INF\
(second try) - webapplication.war\WEB-INF\lib\my_framework.jar\META-INF\

the content of the file is: 该文件的内容是:

<?xml version="1.0" encoding="UTF-8"?>
<jboss-deployment-structure>
    <deployment>
        <exclusions>
            <module name="org.jboss.as.logging (or org.jboss.logging)" /> 
        </exclusions>
    </deployment>

But nothing seems to change in the log process. 但是在日志过程中似乎没有任何改变。 I checked the framework MANIFEST.MF and no other dependencies are imported. 我检查了框架MANIFEST.MF,没有导入其他依赖项。

I also realized that by cancelling the logging subsystem from standalone.xml the custom logging framework works fine. 我还意识到,通过从standalone.xml取消日志记录子系统,自定义日志记录框架可以正常工作。

You can exclude subsystems from deployments with in the jboss-deployment-structure.xml as well. 您也可以在jboss-deployment-structure.xml排除部署中的子系统。 Excluding the module does not exclude the subsystem from processing the deployment. 排除模块不会排除子系统处理部署。

<?xml version="1.0" encoding="UTF-8"?>
<jboss-deployment-structure>
    <deployment>
        <exclude-subsystems>
            <subsystem name="logging" />
        </exclude-subsystems>
    </deployment>
</jboss-deployment-structure>

Excluding the subsystem will stop the deployment from being processed by the subsystem. 排除子系统将阻止子系统处理部署。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM