Martin Thoma
Martin Thoma

Reputation: 136389

How can I deactivate INFO messages in JBoss?

I don't like to see INFO messages in JBoss. Do you know a flag to controll the JBoss output? I would like to deactivate the INFO messages.

Upvotes: 1

Views: 6777

Answers (3)

Lukasz Stelmach
Lukasz Stelmach

Reputation: 5391

It depends what you want to do exactly.

  1. If you want to change the default log level you have such possibles:

    • go to the profile/deploy/jboss-logging.xml and find such line (under root tag, the end of the file)

      <level name="${jboss.server.log.threshold:INFO}"/>
      

      You can just change the INFO to WARN or other value. It changes the value permanently. Also check the log level for CONSOLE appender:

      <level name="INFO"/>
      
    • you can run JBoss with such the command:

      run.sh -Djboss.server.log.threshold=WARN
      
  2. You you want to just turn off the console logging, you can just:

    • comment these line from the root category (also in the profile/deploy/jboss-logging.xml file)

      <handler-ref name="CONSOLE"/>
      
    • run JBoss and redirect all output (at least on Linux):

      run.sh &> /dev/null
      

Upvotes: 1

Martin Thoma
Martin Thoma

Reputation: 136389

You have to edit {jboss.dir}/server/{server}/deploy/jboss-logging.xml

Search for a block beginning with this line:

<console-handler name="CONSOLE" autoflush="true" target="System.out">

Then edit the Warning level:

<level name="INFO"/>

The Warning-levels are TRACE,DEBUG,INFO,WARN,ERROR andFATAL (Source: Log4J-PDF and log4j-html)

Upvotes: 0

ANGELINK999
ANGELINK999

Reputation: 181

Try modifying the {jboss.dir}/jboss-as/server/{server}/conf/jboss-service.xml.

Find the log4j initialization block and modify the "DefaultJBossServerLogThreshold" attribute as per your needs.

Upvotes: 0

Related Questions