[jboss-dev-forums] [JBoss AS7 Development] - JBoss AS7 Logging

Anil Saldhana do-not-reply at jboss.com
Fri Aug 26 00:59:27 EDT 2011


Anil Saldhana [http://community.jboss.org/people/anil.saldhana] modified the document:

"JBoss AS7 Logging"

To view the document, visit: http://community.jboss.org/docs/DOC-16648

--------------------------------------------------------------
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).
h2. 
h2. Boot Logging
This is the +boot.log+ that you see.  Its configuration is in the +logging.properties+.

h2. 

h2. 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

h2. 
h2. Deployment Level Logging
This is when you want to have your own JDK or Log4J logging driven at the deployment level.  This feature needs to be implemented by  https://issues.jboss.org/browse/JBAS-9084 https://issues.jboss.org/browse/JBAS-9084

h2. 
h2. 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.
--------------------------------------------------------------

Comment by going to Community
[http://community.jboss.org/docs/DOC-16648]

Create a new document in JBoss AS7 Development at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=102&containerType=14&container=2225]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-dev-forums/attachments/20110826/a749caf9/attachment.html 


More information about the jboss-dev-forums mailing list