Search code examples
jbossjndi

JBoss 7.1.1: how to avoid logging JNDI bindings on startup


JBoss 7.1.1 logs the following INFO messages on startup for each EJB deployed; in a development environment the log gets cluttered as we have more than 200 EJBs, does anyone know how to make JBoss NOT log these? thanks

13:40:14,268 INFO  [org.jboss.as.ejb3.deployment.processors.EjbJndiBindingsDeploymentUnitProcessor] (MSC service thread 1-6) JNDI bindings for session bean named QueryItemSess in deployment unit deployment "test.war" are as follows:

java:global/test/QueryItemSess!session.queries.QueryItemSess
java:app/test/QueryItemSess!session.queries.QueryItemSess
java:module/QueryItemSess!session.queries.QueryItemSess
java:global/test/QueryItemSess
java:app/test/QueryItemSess
java:module/QueryItemSess

Solution

  • I don't know if you can explicitly avoid those specific logs, but you can try raising the log level of that package, so those log messages don't show up. You can specify the log level in the standalone.xml config file.

    Find the logging subsystem:

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

    and try adding something like this to the existing logger list:

    <logger category="org.jboss.as.ejb3.deployment.processors">  
        <level name="WARN"/>  
    </logger>
    

    This should raise the log level from INFO to WARN and filter the log. Note that this will affect all of the logs coming from that package, not just the ones listing the JNDI bindings. You can find out more about jboss logging here and about logging conventions here. It's a bit outdated, but the log levels and conventions are the same.