Loading...

Remove console handler from root logger in JBoss/Wildfly

:heavy_exclamation_mark: This post is older than a year. Consider some information might not be accurate anymore. :heavy_exclamation_mark:

This post demonstrates how to remove log handlers at runtime in JBoss EAP 6.4.4 or Wildfly.

If you haven’t cleanup the logging configuration in JBoss and your console.log is growing constantly, then you might have forgotten to remove the console handler in the root logger of the standalone.xml.

<root-logger>
    <level name="INFO"/>
    <handlers>
        <handler name="CONSOLE"/>
        <handler name="FILE"/>
    </handlers>
</root-logger>

To do it in runtime, log into the cli and just use this command:

/subsystem=logging/root-logger=ROOT:remove-handler(name="CONSOLE")

If you are using a logging profile named DEMO:

/subsystem=logging/logging-profile=DEMO/root-logger=ROOT:remove-handler(name="CONSOLE")
Please remember the terms for blog comments.