<?xml version="1.0" encoding="UTF-8"?><!-- This is the configuration for LOG4J --><log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/" threshold="null" debug="null">

    <!-- writes log messages to the console. It outputs file name,
         method name and line number of the caller. This is slow,
         so just use it for debugging. -->
    <appender name="console" class="org.apache.log4j.ConsoleAppender">
        <layout class="org.apache.log4j.PatternLayout">
            <param name="ConversionPattern" value="%d{DATE} [%t] %-5p (%F [%M]:%L) - %m %n"/>
        </layout>
    </appender>

    <!-- the following appenders write to files  -->
    <appender name="exist.ehcache" class="org.apache.log4j.RollingFileAppender">
        <param value="../logs/cocoon-ehcache.log" name="File"/>
        <param name="MaxFileSize" value="500KB"/>
        <param name="Encoding" value="UTF-8"/>
        <layout class="org.apache.log4j.PatternLayout">
            <param name="ConversionPattern" value="%d [%t] %-5p (%F [%M]:%L) - %m %n"/>
        </layout>
    </appender>
    
    <appender name="exist.core" class="org.apache.log4j.RollingFileAppender">
        <param value="../logs/exist.log" name="File"/>
        <param name="MaxFileSize" value="5MB"/>
        <param name="MaxBackupIndex" value="3"/>
        <param name="Encoding" value="UTF-8"/>
        <layout class="org.apache.log4j.PatternLayout">
            <param name="ConversionPattern" value="%d [%t] %-5p (%F [%M]:%L) - %m %n"/>
        </layout>
    </appender>

    <appender name="exist.xacml" class="org.apache.log4j.RollingFileAppender">
        <param value="../logs/xacml.log" name="File"/>
        <param name="MaxFileSize" value="500KB"/>
        <layout class="org.apache.log4j.PatternLayout">
            <param name="ConversionPattern" value="%d [%t] %-5p (%F [%M]:%L) - %m %n"/>
        </layout>
    </appender>

    <appender name="exist.xmldb" class="org.apache.log4j.RollingFileAppender">
        <param value="../logs/xmldb.log" name="File"/>
        <param name="MaxFileSize" value="500KB"/>
        <layout class="org.apache.log4j.PatternLayout">
            <param name="ConversionPattern" value="%d [%t] %-5p (%F [%M]:%L) - %m %n"/>
        </layout>
    </appender>

    <appender name="exist.profiling" class="org.apache.log4j.RollingFileAppender">
        <param value="../logs/profile.log" name="File"/>
        <param name="MaxFileSize" value="500KB"/>
        <layout class="org.apache.log4j.PatternLayout">
            <param name="ConversionPattern" value="%d [%t] %-5p (%F [%M]:%L) - %m %n"/>
        </layout>
    </appender>
    
    <appender name="exist.validation" class="org.apache.log4j.RollingFileAppender">
        <param value="../logs/validation.log" name="File"/>
        <param name="MaxFileSize" value="500KB"/>
        <layout class="org.apache.log4j.PatternLayout">
            <param name="ConversionPattern" value="%d [%t] %-5p (%F [%M]:%L) - %m %n"/>
        </layout>
    </appender>

    
    <!-- the following appenders write to NULL  -->
    <appender name="null" class="org.apache.log4j.varia.NullAppender">
        <layout class="org.apache.log4j.PatternLayout">
            <param name="ConversionPattern" value="%d [%t] %-5p (%F [%M]:%L) - %m %n"/>
        </layout>
    </appender>

    <!-- LF5 appender. Using this appender in an appender-ref will
        pop up the LogFactor5 gui.
    -->
    <appender name="lf5" class="org.apache.log4j.lf5.LF5Appender">
        <param name="MaxNumberOfRecords" value="1000"/>
    </appender>

	<category name="xquery.profiling" additivity="false">
	    <priority value="debug"/>
	    <appender-ref ref="exist.profiling"/>
	</category>

    <category name="org.exist.security.xacml" additivity="false">
        <priority value="warn"/>
        <appender-ref ref="exist.xacml"/>
    </category>

    <category name="org.exist.xmldb" additivity="false">
		 <priority value="debug"/>
        <appender-ref ref="exist.xmldb"/>
    </category>

    

    <category name="httpclient" additivity="false">
        <priority value="info"/>
        <appender-ref ref="console"/>
    </category>
    
    <category name="org.exist.validation" additivity="false">
        <priority value="debug"/>
        <appender-ref ref="exist.validation"/>
    </category>
    
    <category name="net.sf.ehcache" additivity="false">
        <priority value="debug"/>
        <appender-ref ref="exist.ehcache"/>
    </category>

    <!-- Axis produces a large amount of debugging output if
        priority is set to debug -->
    <category name="org.apache" additivity="false">
        <priority value="info"/>
        <appender-ref ref="console"/>
    </category>

    <root>
		 	<priority value="debug"/>
    	<appender-ref ref="exist.core"/>
    </root>
</log4j:configuration>