1 Reply Latest reply on Jan 23, 2017 8:31 PM by James Perkins

    How to stop/disable console logs in wildfly 10

    Shiv Shankar Newbie

      I am trying to configure logging in Wildfly 10. I was able to configure it to write logs to "server.log" file @ location wildfly-10.0.0.Final\standalone\log.

      The server writes properly in the log file, however it also prints on the console which opens when you click standalone.bat. As all the logs are printed on this console, my application slows down a lot. I tried removing CONSOLE handler but still it has no effect..

      Below is the logging part of standalone.xml file.

      Please let me know if there is any way to prevent wildfly from logging on console.

       

      <subsystem xmlns="urn:jboss:domain:logging:3.0">

                  <periodic-rotating-file-handler name="FILE" autoflush="true">

                      <formatter>

                          <named-formatter name="PATTERN"/>

                      </formatter>

                      <file relative-to="jboss.server.log.dir" path="server.log"/>

                      <suffix value=".yyyy-MM-dd"/>

                      <append value="true"/>

                  </periodic-rotating-file-handler>

                  <logger category="com.arjuna">

                      <level name="WARN"/>

                  </logger>

                  <logger category="org.apache.tomcat.util.modeler">

                      <level name="WARN"/>

                  </logger>

                  <logger category="org.jboss.as.config">

                      <level name="ALL"/>

                  </logger>

                  <logger category="sun.rmi">

                      <level name="WARN"/>

                  </logger>

                  <logger category="jacorb">

                      <level name="WARN"/>

                  </logger>

                  <logger category="jacorb.config">

                      <level name="ERROR"/>

                  </logger>

                  <logger category="org.jboss.security">

                      <level name="TRACE"/>

                  </logger>

                  <root-logger>

                      <level name="DEBUG"/>

                      <handlers>

                          <handler name="FILE"/>

                      </handlers>

                  </root-logger>

                  <formatter name="PATTERN">

                      <pattern-formatter pattern="%d{yyyy-MM-dd HH:mm:ss,SSS} %-5p [%c] (%t) %s%E%n"/>

                  </formatter>

                  <formatter name="COLOR-PATTERN">

                      <pattern-formatter pattern="%K{level}%d{HH:mm:ss,SSS} %-5p [%c] (%t) %s%E%n"/>

                  </formatter>

              </subsystem>

       

      Thanks..

        • 1. Re: How to stop/disable console logs in wildfly 10
          James Perkins Master

          If you tried to remove the CONSOLE handler from the standalone.xml file while the server was running that is why it didn't work. You can't edit the configuration file while the server is running. It's best to use CLI or the web console to make configuration changes.

           

          With CLI the following would work using the jboss-cli.bat

          bin\jboss-cli.bat -c --command="/subsystem=logging/root-logger=ROOT:remove-handler=CONSOLE"
          

           

          That should disable console logging.

           

          --

          James R. Perkins