[jboss-dev-forums] [JBoss AS 7 Development] - JBoss AS7 Logging
Ondrej Zizka
do-not-reply at jboss.com
Wed Oct 10 06:13:40 EDT 2012
Ondrej Zizka [https://community.jboss.org/people/ozizka] modified the document:
"JBoss AS7 Logging"
To view the document, visit: https://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 was implemented by https://issues.jboss.org/browse/JBAS-9084 JBAS-9084 / https://issues.jboss.org/browse/AS7-514 AS7-514 .
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.
h2.
h2. Reference
https://community.jboss.org/docs/DOC-17182 http://community.jboss.org/wiki/JBossAS7HowDoI
https://docs.jboss.org/author/display/AS7/Logging+configuration https://docs.jboss.org/author/display/AS7/Logging+configuration
http://community.jboss.org/docs/DOC-17277 http://community.jboss.org/wiki/JBossAS7SecurityAuditing
--------------------------------------------------------------
Comment by going to Community
[https://community.jboss.org/docs/DOC-16648]
Create a new document in JBoss AS 7 Development at Community
[https://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/20121010/ceb0ab06/attachment.html
More information about the jboss-dev-forums
mailing list