3 Replies Latest reply on Apr 30, 2014 1:44 PM by James Perkins

    subsystem module overriding jboss logging in standalone.xml (EAP 6.1)

    Ross Stockman Newbie

      Is there some way to configure jboss to override whatever logging configuration is included in an added subsystem module and force all logging to utilize the logging configuration in the standalone.xml?

       

      For our application we are utilizing logging configuration provided in jboss standalone.xml. We do not have any log4j.xml or log4j.properties files in any of our .war deployment files. Recently we added a new subsystem module to our standalone.xml to support ssl for tibco. This somehow caused the logging configuration we have set up in the standalone.xml to get overridden.

       

      For example, before we added this new module our log entries looked like this:

       

      2014-04-25 14:51:38,917 DEBUG [com.bb.core.config.TibcoContextConfig] (ServerService Thread Pool -- 57) debug level message

      2014-04-25 14:51:38,938 INFO  [com.bb.core.config.TibcoContextConfig] (ServerService Thread Pool -- 57) info level message

      2014-04-25 14:51:38,938 WARN  [com.bb.core.config.TibcoContextConfig] (ServerService Thread Pool -- 57) warn level message

      2014-04-25 14:51:38,938 ERROR [com.bb.core.config.TibcoContextConfig] (ServerService Thread Pool -- 57) error level message

       

      After we added the new module the same log entries look like this:

       

      2014-04-25 14:49:13,392 ERROR [stderr] (ServerService Thread Pool -- 54) [ServerService Thread Pool -- 54] INFO com.bb.core.config.TibcoContextConfig - info level message

      2014-04-25 14:49:13,394 ERROR [stderr] (ServerService Thread Pool -- 54) [ServerService Thread Pool -- 54] WARN com.bb.core.config.TibcoContextConfig - warn level message

      2014-04-25 14:49:13,403 ERROR [stderr] (ServerService Thread Pool -- 54) [ServerService Thread Pool -- 54] ERROR com.bb.core.config.TibcoContextConfig - error level message

       

      Note that all lines are getting set as ERROR on the left and the actual log level on the right. Also note that DEBUG level logging is now getting suppressed.

       

       

      This is the configuration we added for the new subsystem module in the standalone.xml in bold. (If I remove this line in bold then logging returns to normal.)

       

      <subsystem xmlns="urn:jboss:domain:ee:1.1">

          <global-modules>

              <module name="com.tibco.mdm" slot="main"/>

              <module name="sun.jdk" slot="main"/>

          </global-modules>

         ...

      </subsystem>

       

      ... and in $JBOSS_HOME/modules/com/tibco/mdm/main we set up the module.xml and the various required jars. This does include an slf4j jar file which is a dependency for the tibco jars. I can share more about this if needed.

       

      Our logging config from standalone.xml that is no longer working because of the module:

       

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

          <console-handler name="CONSOLE">

              <level name="DEBUG"/>

              <formatter>

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

              </formatter>

          </console-handler>

          <logger category="com.bb">

              <level name="DEBUG"/>

          </logger>

          <logger category="org.springframework">

              <level name="WARN"/>

          </logger>

          <root-logger>

              <level name="INFO"/>

              <handlers>

                  <handler name="CONSOLE"/>

              </handlers>

          </root-logger>

      </subsystem>

       

      Is there some way to configure jboss to override whatever logging configuration is included in an added subsystem module and force all logging to utilize the logging configuration in the standalone.xml?