Version 5

    This article describes the logging configuration starting JBoss AS v7.0.0.  The article should be updated periodically with any changes that have happened to logging (and note the version where the change occurred).

    Boot Logging

    This is the boot.log that you see.  Its configuration is in the logging.properties.

     

     

    Server Logging

    The configuration should be done in the standalone.xml for the standalone distribution.  Basically the configuration now is done in the domain model. So it is either domain.xml or standalone.xml depending on the type of distribution.

     

    The log output will go into server.log

     

    Deployment Level Logging

    This is when you want to have your own JDK or Log4J logging driven at the deployment level.  This feature was implemented by JBAS-9084 / AS7-514 .

     

    How do I?

     

    Suppose you want to enable trace level logging on org.jboss.security,  this is how the standalone.xml block looks:

     

     <subsystem xmlns="urn:jboss:domain:logging:1.0">
                <console-handler name="CONSOLE" autoflush="true">
                    <level name="INFO"/>
                    <formatter>
                        <pattern-formatter pattern="%d{HH:mm:ss,SSS} %-5p [%c] (%t) %s%E%n"/>
                    </formatter>
                </console-handler>
                <periodic-rotating-file-handler name="FILE" autoflush="true">
                    <level name="TRACE"/>
                    <formatter>
                        <pattern-formatter pattern="%d{HH:mm:ss,SSS} %-5p [%c] (%t) %s%E%n"/>
                    </formatter>
                    <file relative-to="jboss.server.log.dir" path="server.log"/>
                    <suffix value=".yyyy-MM-dd"/>
                </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="sun.rmi">
                    <level name="WARN"/>
                </logger> 
                <logger category="org.jboss.security">
                    <level name="TRACE"/>
                </logger>
    

     

    Note that I added a logger block for "org.jboss.security".  Now I need to also change the level for the appender -either CONSOLE or FILE. In most cases, you want to do it for FILE.  Now enjoy the trace entries.

     

    Reference

    http://community.jboss.org/wiki/JBossAS7HowDoI

     

    https://docs.jboss.org/author/display/AS7/Logging+configuration

     

    http://community.jboss.org/wiki/JBossAS7SecurityAuditing