<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">

<log4j:configuration>

    <appender name="console" class="org.apache.log4j.ConsoleAppender">
        <layout class="org.apache.log4j.PatternLayout">
            <param name="ConversionPattern" value="%d{dd MMM yyyy HH:mm:ss.SSS} [%p] [%t] [%c] - %m%n"/>
        </layout>
    </appender>

    <appender name="file" class="org.apache.log4j.RollingFileAppender">
        <param name="File" value="castor-log.txt"/>
        <param name="MaxFileSize" value="2MB"/>
        <param name="MaxBackupIndex" value="2"/>
        <layout class="org.apache.log4j.PatternLayout">
            <param name="ConversionPattern" value="%d{dd MMM yyyy HH:mm:ss.SSS} [%p] [%t] [%c] - %m%n"/>
        </layout>
    </appender>

    <appender name="db" class="log4j.CastorAppender">
    	<param name="DatabaseName" value="LOGGING"/>
    	<param name="BufferSize" value="10"/>
    	<param name="ColumnWidthClass" value="100"/>
    	<param name="ColumnWidthThread" value="100"/>
    	<param name="ColumnWidthMessage" value="1000"/>
    	<param name="ColumnWidthStackTrace" value="20000"/>
    	<param name="DuplicateCount" value="true"/>
    </appender>

	<root>
        <priority value="warn" />
        <appender-ref ref="db"/>
    </root>
</log4j:configuration>
