Log4j
<?xmlversion="1.0"encoding="UTF-8"?>
<!DOCTYPElog4j:configurationSYSTEM"log4j.dtd">
<!--=====================================================================-->
<!---->
<!--Log4jConfiguration-->
<!---->
<!--=====================================================================-->
<!--$Id:jboss-log4j.xml876782009-04-2216:47:[email protected]$-->
<!--
|FormoreconfigurationinformationandexamplesseetheJakartaLog4j
|owebsite:http://jakarta.apache.org/log4j
-->
<log4j:configurationxmlns:log4j="http://jakarta.apache.org/log4j/"debug="false">
<!--=================================-->
<!--Preservemessagesinalocalfile-->
<!--=================================-->
<!--Atime/datebasedrollingappender-->
<appendername="FILE"class="org.jboss.logging.appender.DailyRollingFileAppender">
<errorHandlerclass="org.jboss.logging.util.OnlyOnceErrorHandler"/>
<paramname="File"value="${jboss.server.log.dir}/server.log"/>
<paramname="Append"value="true"/>
<!--InAS5.0.xtheserverlogthresholdwassetbyasystem
property.In5.1andlaterweareinsteadusingthesystem
propertytosetthepriorityontherootlogger(see<root/>below)
<paramname="Threshold"value="${jboss.server.log.threshold}"/>
-->
<!--Rolloveratmidnighteachday-->
<paramname="DatePattern"value="'.'yyyy-MM-dd"/>
<!--Rolloveratthetopofeachhour
<paramname="DatePattern"value="'.'yyyy-MM-dd-HH"/>
-->
<layoutclass="org.apache.log4j.PatternLayout">
<!--Thedefaultpattern:DatePriority[Category](Thread)Message\n-->
<paramname="ConversionPattern"value="%d%-5p[%c](%t)%m%n"/>
<!--Thefullpattern:DateMSPriority[Category](Thread:NDC)Message\n
<paramname="ConversionPattern"value="%d%-5r%-5p[%c](%t:%x)%m%n"/>
-->
</layout>
</appender>
<!--Asizebasedfilerollingappender
<appendername="FILE"class="org.jboss.logging.appender.RollingFileAppender">
<errorHandlerclass="org.jboss.logging.util.OnlyOnceErrorHandler"/>
<paramname="File"value="${jboss.server.log.dir}/server.log"/>
<paramname="Append"value="false"/>
<paramname="MaxFileSize"value="500KB"/>
<paramname="MaxBackupIndex"value="1"/>
<layoutclass="org.apache.log4j.PatternLayout">
<paramname="ConversionPattern"value="%d%-5p[%c]%m%n"/>
</layout>
</appender>
-->
<!--==============================-->
<!--Appendmessagestotheconsole-->
<!--==============================-->
<appendername="CONSOLE"class="org.apache.log4j.ConsoleAppender">
<errorHandlerclass="org.jboss.logging.util.OnlyOnceErrorHandler"/>
<paramname="Target"value="System.out"/>
<paramname="Threshold"value="INFO"/>
<layoutclass="org.apache.log4j.PatternLayout">
<!--Thedefaultpattern:DatePriority[Category]Message\n-->
<paramname="ConversionPattern"value="%d{ABSOLUTE}%-5p[%c{1}]%m%n"/>
</layout>
</appender>
<!--======================-->
<!--MoreAppenderexamples-->
<!--======================-->
<!--Buffereventsandlogthemasynchronously
<appendername="ASYNC"class="org.apache.log4j.AsyncAppender">
<errorHandlerclass="org.jboss.logging.util.OnlyOnceErrorHandler"/>
<appender-refref="FILE"/>
<appender-refref="CONSOLE"/>
<appender-refref="SMTP"/>
</appender>
-->
<!--EMaileventstoanadministrator
-->
<appendername="SMTP"class="org.apache.log4j.net.SMTPAppender">
<errorHandlerclass="org.jboss.logging.util.OnlyOnceErrorHandler"/>
<paramname="Threshold"value="ERROR"/>
<paramname="To"value="[email protected],[email protected]"/>
<paramname="From"value="[email protected]"/>
<paramname="Subject"value="JBossSeverErrorsonNHRS1042(HOU2)"/>
<paramname="SMTPHost"value="e2ksmtp.e2k.com"/>-----mailservername
<paramname="BufferSize"value="10"/>
<layoutclass="org.apache.log4j.PatternLayout">
<paramname="ConversionPattern"value="[%d{ABSOLUTE},%c{1}]%m%n"/>
</layout>
</appender>
<!--Syslogevents
<appendername="SYSLOG"class="org.apache.log4j.net.SyslogAppender">
<errorHandlerclass="org.jboss.logging.util.OnlyOnceErrorHandler"/>
<paramname="Facility"value="LOCAL7"/>
<paramname="FacilityPrinting"value="true"/>
<paramname="SyslogHost"value="localhost"/>
<layoutclass="org.apache.log4j.PatternLayout">
<paramname="ConversionPattern"value="[%d{ABSOLUTE},%c{1}]%m%n"/>
</layout>
</appender>
-->
<!--LogeventstoJMS(requiresatopictobecreated)
<appendername="JMS"class="org.apache.log4j.net.JMSAppender">
<errorHandlerclass="org.jboss.logging.util.OnlyOnceErrorHandler"/>
<paramname="Threshold"value="ERROR"/>
<paramname="TopicConnectionFactoryBindingName"value="java:/ConnectionFactory"/>
<paramname="TopicBindingName"value="topic/MyErrorsTopic"/>
</appender>
-->
<!--LogeventsthroughSNMP
<appendername="TRAP_LOG"class="org.apache.log4j.ext.SNMPTrapAppender">
<errorHandlerclass="org.jboss.logging.util.OnlyOnceErrorHandler"/>
<paramname="ImplementationClassName"value="org.apache.log4j.ext.JoeSNMPTrapSender"/>
<paramname="ManagementHost"value="127.0.0.1"/>
<paramname="ManagementHostTrapListenPort"value="162"/>
<paramname="EnterpriseOID"value="1.3.6.1.4.1.24.0"/>
<paramname="LocalIPAddress"value="127.0.0.1"/>
<paramname="LocalTrapSendPort"value="161"/>
<paramname="GenericTrapType"value="6"/>
<paramname="SpecificTrapType"value="12345678"/>
<paramname="CommunityString"value="public"/>
<paramname="ForwardStackTraceWithTrap"value="true"/>
<paramname="Threshold"value="DEBUG"/>
<paramname="ApplicationTrapOID"value="1.3.6.1.4.1.24.12.10.22.64"/>
<layoutclass="org.apache.log4j.PatternLayout">
<paramname="ConversionPattern"value="%d,%p,[%t],[%c],%m%n"/>
</layout>
</appender>
-->
<!--EmiteventsasJMXnotifications
<appendername="JMX"class="org.jboss.monitor.services.JMXNotificationAppender">
<errorHandlerclass="org.jboss.logging.util.OnlyOnceErrorHandler"/>
<paramname="Threshold"value="WARN"/>
<paramname="ObjectName"value="jboss.system:service=Logging,type=JMXNotificationAppender"/>
<layoutclass="org.apache.log4j.PatternLayout">
<paramname="ConversionPattern"value="%d%-5p[%c]%m"/>
</layout>
</appender>
-->
<!--SecurityAUDITAppender
<appendername="AUDIT"class="org.jboss.logging.appender.DailyRollingFileAppender">
<errorHandlerclass="org.jboss.logging.util.OnlyOnceErrorHandler"/>
<paramname="File"value="${jboss.server.log.dir}/audit.log"/>
<paramname="Append"value="true"/>
<paramname="DatePattern"value="'.'yyyy-MM-dd"/>
<layoutclass="org.apache.log4j.PatternLayout">
<paramname="ConversionPattern"value="%d%-5p[%c](%t:%x)%m%n"/>
</layout>
</appender>
-->
<!--================-->
<!--Limitcategories-->
<!--================-->
<!--Limittheorg.apachecategorytoINFOasitsDEBUGisverbose-->
<categoryname="org.apache">
<priorityvalue="INFO"/>
</category>
<!--LimitthejacorbcategorytoWARNasitsINFOisverbose-->
<categoryname="jacorb">
<priorityvalue="WARN"/>
</category>
<!--Limitthecom.arjunacategorytoWARNasitsINFOisverbose-->
<categoryname="com.arjuna">
<priorityvalue="WARN"/>
</category>
<!--Limittheorg.hibernatecategorytoWARN-->
<categoryname="org.hibernate">
<priorityvalue="WARN"/>
</category>
<!--SettheloggingleveloftheJSFimplementationthatuses
|java.util.logging.Thejdklogginglevelscanbecontrolled
|throughtheorg.jboss.logging.log4j.JDKLevelclassthat
|inadditiontothestandardlog4jlevelsitaddssupportfor
|SEVERE,WARNING,CONFIG,FINE,FINER,FINEST
-->
<categoryname="javax.enterprise.resource.webcontainer.jsf">
<priorityvalue="WARN"class="org.jboss.logging.log4j.JDKLevel"/>
</category>
<!--Limittheorg.jgroupscategorytoWARNasitsINFOisverbose-->
<categoryname="org.jgroups">
<priorityvalue="WARN"/>
</category>
<!--Limittheorg.quartzcategorytoINFOasitsDEBUGisverbose-->
<categoryname="org.quartz">
<priorityvalue="INFO"/>
</category>
<!--Limitthecom.suncategorytoINFOasitsFINEisverbose-->
<categoryname="com.sun">
<priorityvalue="WARN"/>
</category>
<!--LimitthesuncategorytoINFOasitsFINEisverbose-->
<categoryname="sun">
<priorityvalue="WARN"/>
</category>
<!--Limitthejavax.xml.bindcategorytoINFOasitsFINEisverbose-->
<categoryname="javax.xml.bind">
<priorityvalue="INFO"/>
</category>
<!--LimitJBosscategories
<categoryname="org.jboss">
<priorityvalue="INFO"/>
</category>
-->
<!--LimittheJSR77categories-->
<categoryname="org.jboss.management">
<priorityvalue="INFO"/>
</category>
<!--Limittheverbosefaceletscompiler-->
<categoryname="facelets.compiler">
<priorityvalue="WARN"/>
</category>
<!--Limittheverboseajax4jsfinitialization-->
<categoryname="org.ajax4jsf">
<priorityvalue="WARN"/>
</category>
<!--Limittheverboseembeddedjoprcategories-->
<categoryname="org.rhq">
<priorityvalue="WARN"/>
</category>
<!--Limittheverboseseamcategories-->
<categoryname="org.jboss.seam">
<priorityvalue="WARN"/>
</category>
<!--ShowtheevolutionoftheDataSourcepoolinthelogs[inUse/Available/Max]
<categoryname="org.jboss.resource.connectionmanager.JBossManagedConnectionPool">
<priorityvalue="TRACE"/>
</category>
-->
<!--CategoryspecificallyforSecurityAuditProvider
<categoryname="org.jboss.security.audit.providers.LogAuditProvider"additivity="false">
<priorityvalue="TRACE"/>
<appender-refref="AUDIT"/>
</category>
-->
<!--Limittheorg.jboss.serial(jboss-serialization)toINFOasitsDEBUGisverbose-->
<categoryname="org.jboss.serial">
<priorityvalue="INFO"/>
</category>
<!--Decreasetheprioritythresholdfortheorg.jboss.variacategory
<categoryname="org.jboss.varia">
<priorityvalue="DEBUG"/>
</category>
-->
<!--EnableJBossWSmessagetracing
<categoryname="org.jboss.ws.core.MessageTrace">
<priorityvalue="TRACE"/>
</category>
-->
<!--
|AnexampleofenablingthecustomTRACElevelprioritythatisused
|bytheJBossinternalstodiagnoselowleveldetails.Thisexample
|turnsonTRACElevelmsgsfortheorg.jboss.ejb.pluginspackageandits
|subpackages.ThiswillproduceALOTofloggingoutput.
|
|Note:sincejbossAS4.2.x,thetracelevelissupportednativelyby
|log4j,soalthoughthecustomorg.jboss.logging.XLevelprioritywill
|stillwork,thereisnoneedtouseit.Thetwoexamplesthatfollow
|willbothenabletracelogging.
<categoryname="org.jboss.system">
<priorityvalue="TRACE"class="org.jboss.logging.XLevel"/>
</category>
<categoryname="org.jboss.ejb.plugins">
<priorityvalue="TRACE"/>
</category>
-->
<!--
|LogstheseeventstoSNMP:
-serverstarts/stops
-clusterevolution(nodedeath/startup)
-WhenanEJBarchiveisdeployed(andassociatedverifiedmessages)
-WhenanEARarchiveisdeployed
<categoryname="org.jboss.system.server.Server">
<priorityvalue="INFO"/>
<appender-refref="TRAP_LOG"/>
</category>
<categoryname="org.jboss.ha.framework.interfaces.HAPartition.lifecycle">
<priorityvalue="INFO"/>
<appender-refref="TRAP_LOG"/>
</category>
<categoryname="org.jboss.deployment.MainDeployer">
<priorityvalue="ERROR"/>
<appender-refref="TRAP_LOG"/>
</category>
<categoryname="org.jboss.ejb.EJBDeployer">
<priorityvalue="INFO"/>
<appender-refref="TRAP_LOG"/>
</category>
<categoryname="org.jboss.deployment.EARDeployer">
<priorityvalue="INFO"/>
<appender-refref="TRAP_LOG"/>
</category>
-->
<!--Clusteringlogging-->
<!--Uncommentthefollowingtoredirecttheorg.jgroupsand
org.jboss.hacategoriestoacluster.logfile.
<appendername="CLUSTER"class="org.jboss.logging.appender.RollingFileAppender">
<errorHandlerclass="org.jboss.logging.util.OnlyOnceErrorHandler"/>
<paramname="File"value="${jboss.server.log.dir}/cluster.log"/>
<paramname="Append"value="false"/>
<paramname="MaxFileSize"value="500KB"/>
<paramname="MaxBackupIndex"value="1"/>
<layoutclass="org.apache.log4j.PatternLayout">
<paramname="ConversionPattern"value="%d%-5p[%c]%m%n"/>
</layout>
</appender>
<categoryname="org.jgroups">
<priorityvalue="DEBUG"/>
<appender-refref="CLUSTER"/>
</category>
<categoryname="org.jboss.ha">
<priorityvalue="DEBUG"/>
<appender-refref="CLUSTER"/>
</category>
-->
<!--=======================-->
<!--SetuptheRootcategory-->
<!--=======================-->
<root>
<!--
Settherootloggerpriorityviaasystemproperty.Notethisisparsedbylog4j,
sothefullJBosssystempropertyformatisnotsupported;e.g.
settingadefaultvia${jboss.server.log.threshold:WARN}willnotwork.
-->
<priorityvalue="${jboss.server.log.threshold}"/>
<!--
DisableCONSOLElogginginProductionenvironments.
<appender-refref="CONSOLE"/>
-->
<appender-refref="SMTP"/>
<appender-refref="FILE"/>
</root>
</log4j:configuration>