jzy3d-api/log4j.xml

207 lines
7.9 KiB
XML

<?xml version="1.0" encoding="UTF-8"?>
<!--
Log4j Configuration - For more configuration information and examples see
the Jakarta Log4j - website: http://jakarta.apache.org/log4j
-->
<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/" debug="false" threshold="null">
<property name="jzy3d.log.dir" value="data/logs/"/>
<!-- ================================= -->
<!-- Preserve messages in a local file -->
<!-- ================================= -->
<!-- A time/date based rolling appender -->
<appender name="FILE" class="org.apache.log4j.DailyRollingFileAppender">
<errorHandler class="org.apache.log4j.helpers.OnlyOnceErrorHandler" />
<param name="File" value="${jzy3d.log.dir}/server.log" />
<param name="Append" value="true" />
<!-- Rollover at midnight every day -->
<param name="DatePattern" value="'.'yyyy-MM-dd" />
<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern" value="%d{ISO8601} %-5p [%c] %m%n" />
</layout>
</appender>
<!--
A size based file rolling appender
<appender name="FILE" class="org.apache.log4j.RollingFileAppender">
<errorHandler class="org.apache.log4j.helpers.OnlyOnceErrorHandler" />
<param name="File" value="${jzy3d.log.dir}/server.log" />
<param name="Append" value="false" />
<param name="MaxFileSize" value="500KB" />
<param name="MaxBackupIndex" value="1" />
<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern" value="%d %-5p [%c] %m%n" />
</layout>
</appender>
-->
<!-- ============================= -->
<!-- Gather errors in a local file -->
<!-- ============================= -->
<appender name="ERROR-FILE" class="org.apache.log4j.DailyRollingFileAppender">
<errorHandler class="org.apache.log4j.helpers.OnlyOnceErrorHandler" />
<param name="File" value="${jzy3d.log.dir}/jzy3d-error.log" />
<param name="Append" value="true" />
<!-- Rollover at midnight every day -->
<param name="DatePattern" value="'.'yyyy-MM-dd" />
<layout class="org.apache.log4j.PatternLayout">
<!-- The default pattern: Date Priority [Category] Message\n -->
<param name="ConversionPattern" value="%d{ISO8601} %-5p [%c] %m%n" />
<!--
The full pattern: Date MS Priority [Category] (Thread:NDC) Message\n
<param name="ConversionPattern" value="%d %-5r %-5p [%c] (%t:%x) %m%n"/>
-->
</layout>
</appender>
<!-- ============================= -->
<!-- Gather stderr in a local file -->
<!-- ============================= -->
<appender name="STDERR-FILE" class="org.apache.log4j.DailyRollingFileAppender">
<errorHandler class="org.apache.log4j.helpers.OnlyOnceErrorHandler" />
<param name="File" value="${jzy3d.log.dir}/stderr.log" />
<param name="Append" value="true" />
<!-- Rollover at midnight every day -->
<param name="DatePattern" value="'.'yyyy-MM-dd" />
<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern" value="%d{ISO8601} %-5p [%c] %m%n" />
</layout>
</appender>
<!-- ============================== -->
<!-- Append messages to the console -->
<!-- ============================== -->
<appender name="CONSOLE" class="org.apache.log4j.ConsoleAppender">
<errorHandler class="org.apache.log4j.helpers.OnlyOnceErrorHandler" />
<param name="Target" value="System.out" />
<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern" value="%d{ABSOLUTE} %-5p [%c{1}] %m%n" />
</layout>
<filter class="org.apache.log4j.varia.LevelRangeFilter">
<param name="levelMin" value="INFO" />
</filter>
</appender>
<!-- ====================== -->
<!-- More Appender examples -->
<!-- ====================== -->
<!--
Buffer events and log them asynchronously
<appender name="ASYNC" class="org.apache.log4j.AsyncAppender">
<errorHandler class="org.apache.log4j.helpers.OnlyOnceErrorHandler" />
<appender-ref ref="FILE" />
<appender-ref ref="CONSOLE" />
<appender-ref ref="SMTP" />
</appender>
-->
<!--
EMail events to an administrator
<appender name="SMTP" class="org.apache.log4j.net.SMTPAppender">
<errorHandler class="org.apache.log4j.helpers.OnlyOnceErrorHandler" />
<param name="Threshold" value="ERROR" />
<param name="To" value="admin@myhost.domain.com" />
<param name="From" value="nobody@myhost.domain.com" />
<param name="Subject" value="Tomcat Server Errors" />
<param name="SMTPHost" value="localhost" />
<param name="BufferSize" value="10" />
<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern" value="[%d{ABSOLUTE},%c{1}] %m%n" />
</layout>
</appender>
-->
<!--
Syslog events
<appender name="SYSLOG" class="org.apache.log4j.net.SyslogAppender">
<errorHandler class="org.apache.log4j.helpers.OnlyOnceErrorHandler" />
<param name="Facility" value="LOCAL7" />
<param name="FacilityPrinting" value="true" />
<param name="SyslogHost" value="localhost" />
<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern" value="[%d{ABSOLUTE},%c{1}] %m%n" />
</layout>
</appender>
-->
<!--
Log events to JMS (requires a topic to be created)
<appender name="JMS" class="org.apache.log4j.net.JMSAppender">
<errorHandler class="org.apache.log4j.helpers.OnlyOnceErrorHandler" />
<param name="Threshold" value="ERROR" />
<param name="TopicConnectionFactoryBindingName" value="java:/ConnectionFactory" />
<param name="TopicBindingName" value="topic/MyErrorsTopic" />
</appender>
-->
<!--
Log events through SNMP
<appender name="TRAP_LOG" class="org.apache.log4j.ext.SNMPTrapAppender">
<errorHandler class="org.apache.log4j.helpers.OnlyOnceErrorHandler" />
<param name="ImplementationClassName" value="org.apache.log4j.ext.JoeSNMPTrapSender" />
<param name="ManagementHost" value="127.0.0.1" />
<param name="ManagementHostTrapListenPort" value="162" />
<param name="EnterpriseOID" value="1.3.6.1.4.1.24.0" />
<param name="LocalIPAddress" value="127.0.0.1" />
<param name="LocalTrapSendPort" value="161" />
<param name="GenericTrapType" value="6" />
<param name="SpecificTrapType" value="12345678" />
<param name="CommunityString" value="public" />
<param name="ForwardStackTraceWithTrap" value="true" />
<param name="Threshold" value="DEBUG" />
<param name="ApplicationTrapOID" value="1.3.6.1.4.1.24.12.10.22.64" />
<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern" value="%d,%p,[%t],[%c],%m%n" />
</layout>
</appender>
-->
<!--
Emit events as JMX notifications
<appender name="JMX" class="org.apache.log4j.jmx.AppenderDynamicMBean">
<errorHandler class="org.apache.log4j.helpers.OnlyOnceErrorHandler" />
<param name="Threshold" value="WARN" />
<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern" value="%d %-5p [%c] %m" />
</layout>
</appender>
-->
<!-- Limit the org.quartz category to INFO as its DEBUG is verbose -->
<category name="org.jzy3d" additivity="true">
<priority value="INFO" />
</category>
<category name="jzy3d-error-log">
<priority value="TRACE" />
<appender-ref ref="ERROR-FILE" />
</category>
<!-- System.err redirected by Tomcat to a logger STDERR with level ERROR -->
<category name="STDERR" additivity="false">
<priority value="ERROR" />
<appender-ref ref="STDERR-FILE" />
</category>
<!-- ======================= -->
<!-- Setup the Root category -->
<!-- ======================= -->
<root>
<level value="WARN" />
<appender-ref ref="CONSOLE" />
<appender-ref ref="FILE" />
</root>
</log4j:configuration>