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

<!-- ===================================================================== -->
<!--                                                                       -->
<!--  UI Log4j Configuration                                                  -->
<!--                                                                       -->
<!-- ===================================================================== -->

<!-- $Id: log4j.xml,v 1.2 2004/04/30 16:32:21 dkopylenko Exp $ -->

<!--
   | For more configuration infromation and examples see the Jakarta Log4j
   | owebsite: http://jakarta.apache.org/log4j
 -->

<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/" debug="false">

	<!-- ESR Logging Appenders -->
	<appender name="esr.console.appender.detailed" class="org.apache.log4j.ConsoleAppender">
		<layout class="org.apache.log4j.PatternLayout">
			<param name="ConversionPattern" value="%d %-5p [%c{1}] %m%n"/>
		</layout>
	</appender>
	<appender name="esr.file.appender.detailed" class="org.apache.log4j.RollingFileAppender">
	    <param name="append" value="true"/>
		<param name="file" value="esr_${weblogic.Name}.log"/>
	    <param name="maxFileSize" value="10MB"/>
		<param name="maxBackupIndex" value="10"/>
		<layout class="org.apache.log4j.PatternLayout">
			<param name="ConversionPattern" value="[%p] %d{dd MMM yyyy hh:mm:ss.SSS aa} %t [%c]%n%m%n%n"/>
		</layout>
	</appender>
	<appender name="performance.file.appender.detailed" class="org.apache.log4j.RollingFileAppender">
	    <param name="append" value="true"/>
		<param name="file" value="performance_${weblogic.Name}.log"/>
	    <param name="maxFileSize" value="10MB"/>
		<param name="maxBackupIndex" value="10"/>
		<layout class="org.apache.log4j.PatternLayout">
			<param name="ConversionPattern" value="[%p] %d{dd MMM yyyy hh:mm:ss.SSS aa} %t [%c]%n%m%n%n"/>
		</layout>
	</appender>
	<appender name="caip.file.appender.detailed" class="org.apache.log4j.RollingFileAppender">
	    <param name="append" value="true"/>
		<param name="file" value="caip_${weblogic.Name}.log"/>
	    <param name="maxFileSize" value="10MB"/>
		<param name="maxBackupIndex" value="10"/>
		<layout class="org.apache.log4j.PatternLayout">
			<param name="ConversionPattern" value="[%p] %d{dd MMM yyyy hh:mm:ss.SSS aa} %t [%c]%n%m%n%n"/>
		</layout>
	</appender>
	<appender name="triggerEvent.file.appender.detailed" class="org.apache.log4j.RollingFileAppender">
	    <param name="append" value="true"/>
		<param name="file" value="triggerEvent_${weblogic.Name}.log"/>
	    <param name="maxFileSize" value="10MB"/>
		<param name="maxBackupIndex" value="10"/>
		<layout class="org.apache.log4j.PatternLayout">
			<param name="ConversionPattern" value="[%p] %d{dd MMM yyyy hh:mm:ss.SSS aa} %t [%c]%n%m%n%n"/>
		</layout>
	</appender>
	<!-- ESR Logging Appenders -->

	<!-- PS Logging Appenders -->
	<appender name="ps.file.appender.detailed" class="org.apache.log4j.RollingFileAppender">
	    <param name="append" value="false"/>
		<param name="file" value="personservice.log"/>
	    <param name="maxFileSize" value="20MB"/>
		<param name="maxBackupIndex" value="10"/>
		<layout class="org.apache.log4j.PatternLayout">
			<param name="ConversionPattern" value="[%p] %d{dd MMM yyyy hh:mm:ss.SSS aa} %t [%c]%n%m%n%n"/>
		</layout>
	</appender>
	<!-- PS Logging Appenders -->



	<!--  Framework Logger-->
    <logger name="gov.va.med.fw" additivity="false">
        <level value="info" />
        <appender-ref ref="esr.file.appender.detailed" />
    </logger>
    <logger name="gov.va.med.fw.service.trigger" additivity="false">
        <level value="info" />
        <appender-ref ref="triggerEvent.file.appender.detailed" />
    </logger>

	<!-- ESR Business Services -->
    <logger name="gov.va.med.esr.service.impl" additivity="false">
        <level value="info" />
        <appender-ref ref="esr.file.appender.detailed" />
    </logger>

  <!-- ESR UI Layer -->
    <logger name="gov.va.med.esr.ui" additivity="false">
        <level value="info" />
        <appender-ref ref="esr.file.appender.detailed" />
    </logger>

  <!-- Common Batch Processes -->
    <logger name="gov.va.med.esr.common.batchprocess" additivity="false">
        <level value="info" />
        <appender-ref ref="esr.file.appender.detailed" />
    </logger>

  <!-- Common Clocks -->
    <logger name="gov.va.med.esr.common.clock" additivity="false">
        <level value="info" />
        <appender-ref ref="esr.file.appender.detailed" />
    </logger>


    <!--  Common Report Logger-->
    <logger name="gov.va.med.esr.common.report" additivity="false">
        <level value="info" />
        <appender-ref ref="esr.file.appender.detailed" />
    </logger>

	<!-- CAIP Logger -->
    <logger name="gov.va.med.esr.service.impl.PSIMSOADelegateServiceAdvice" additivity="false">
        <level value="error" />
        <appender-ref ref="caip.file.appender.detailed" />
    </logger>

	<!-- Special performance metrics Loggers -->
	<!-- AOP-based -->
    <logger name="gov.va.med.fw.util.PerformanceMonitorInterceptor" additivity="false">
        <level value="trace" />
        <appender-ref ref="performance.file.appender.detailed" />
    </logger>
	<!-- Non AOP-based -->
    <logger name="gov.va.med.fw.util.StopWatchLogger" additivity="false">
        <level value="trace" />
        <appender-ref ref="performance.file.appender.detailed" />
    </logger>

    <!-- Third party Logger-->
    <logger name="org" additivity="false">
        <level value="error" />
        <appender-ref ref="esr.file.appender.detailed" />
    </logger>

	<!-- ONLY IN LOCAL - Uncomment for debugging information on Rules fired
    <logger name="gov.va.med.fw.rule.RuleFlowManager" additivity="false">
        <level value="debug" />
        <appender-ref ref="esr.file.appender.detailed" />
    </logger>
    <logger name="gov.va.med.fw.rule.RuleExceptionHandler" additivity="false">
        <level value="debug" />
        <appender-ref ref="esr.file.appender.detailed" />
    </logger> -->

    <logger name="ALWAYS_LOGGER" additivity="false">
        <level value="all" />
        <appender-ref ref="esr.file.appender.detailed" />
    </logger>

	<root>
	    <level value="warn" />
		<appender-ref ref="esr.console.appender.detailed"/>
		<appender-ref ref="esr.file.appender.detailed"/>
	</root>

</log4j:configuration>