<?xml version="1.0" encoding="UTF-8" ?>
<Configuration>
	<Appenders>
		<Console name="STDOUT" target="SYSTEM_OUT">
			<PatternLayout pattern="%-6r %d{ISO8601} [%10.10t] %-5p %40.40c %x - %m%n"/>
		</Console>
		<RollingFile name="ROLLING" fileName="testing.rolling.log" filePattern="testing.rolling-%i.log">
			<PatternLayout pattern="%-6r %d{ISO8601} [%15.15t] %-5p %30.30c %x - %m%n" />
			<Policies>
				<SizeBasedTriggeringPolicy size="100KB" />
			</Policies>
			<DefaultRolloverStrategy max="5"/>
		</RollingFile>	
		<RollingFile name="PERFDNS   E" fileName="performance-log.csv" filePattern="performance-log-%i.csv">
			<PatternLayout pattern="%d{yyyy-MM-dd HH:mm:ss.SSS},%m%n" header="time (yyyy-MM-dd HH:mm:ss.000),keyword(s), domain entry point, template id, request id, site id, start time (ms), finish time (ms), duration (s), status, tier${sys:line.separator}"/>
			<Policies>
				<SizeBasedTriggeringPolicy size="10MB" />
			</Policies>
			<DefaultRolloverStrategy max="5"/>
		</RollingFile>

	    <Async name="PERFDNS   E_ASYNC" bufferSize="500">
	        <AppenderRef ref="PERFDNS   E"/>
	    </Async>
	    
	    <SpringAwareAppenderProxy name="JMS" 
			springConfigResourceType="CLASSPATH"
			springConfigurations="classpath:gov/va/med/cds/log4j/config/jms-app-logging-context.xml">
			<PatternLayout pattern="%-6r %d{ISO8601} [%10.10t] %-5p %40.40c %x - %m%n"/>
		</SpringAwareAppenderProxy>
	</Appenders>
	
	<Loggers>
	
		<Logger name="gov.va.med.cds" level="ERROR">
			<AppenderRef ref="ROLLING" />
		</Logger>
				
	 	<Logger name="gov.va.med.cds.util.PerformanceLog" level="INFO">
		    <AppenderRef ref="PERFDNS   E_ASYNC"/>
		</Logger>

		<Logger name="org.springframework" level="ERROR">
			<AppenderRef ref="ROLLING" />
		</Logger>
	
		<Logger name="org.springframework.transaction" level="ERROR">
			<AppenderRef ref="ROLLING" />
		</Logger> 
	
		<Logger name="org.springframework.aop" level="ERROR">
			<AppenderRef ref="STDOUT" />
		</Logger>
		
		<Logger name="gov.va.med.cds.template.TemplateManager" level="ERROR">
			<AppenderRef ref="STDOUT" />
		</Logger>
	
		<Logger name="gov.va.med.cds.filter.FilterManager" level="ERROR">
			<AppenderRef ref="STDOUT" />
		</Logger>
		
		<Logger name="org.hibernate" level="ERROR">
			<AppenderRef ref="STDOUT" />
		</Logger>
		
		<Logger name="org.hibernate.util.JDBCExceptionReporter" level="FATAL">
			<AppenderRef ref="ROLLING" />
		</Logger>
		
		<Logger name="org.hibernate.cfg.Environment" level="ERROR">
			<AppenderRef ref="STDOUT" />
		</Logger>

		<Logger name="gov.va.med.cds.properties" level="ERROR">	
			<AppenderRef ref="STDOUT" />
		</Logger>
	
		<Logger name="org.apache.commons.dbcp2" level="ERROR">
			<AppenderRef ref="STDOUT" />
		</Logger>
	
		<Logger name="gov.va.med.cds.persistence" level="ERROR">
			<AppenderRef ref="ROLLING" />
		</Logger>
	
		<Logger name="gov.va.med.cds.template" level="ERROR">
			<AppenderRef ref="STDOUT" />
		</Logger>

		<Logger name="gov.va.med.cds.xml" level="ERROR">
			<AppenderRef ref="ROLLING" />
		</Logger>
		
		<Logger name="gov.va.med.cds.oomapping" level="ERROR">
			<AppenderRef ref="ROLLING" />
		</Logger>
		
		<Logger name="gov.va.med.cds.xml.schema" level="ERROR" additivity="false">
			<AppenderRef ref="ROLLING" />
			<AppenderRef ref="STDOUT" />
		</Logger>

		<Logger name="gov.va.med.cds.mapping" level="ERROR">
			<AppenderRef ref="ROLLING" />
		</Logger>
			
		<Logger name="gov.va.med.cds.exceptionframework.ExceptionHandlerConfigurationTest" level="ERROR">
			<AppenderRef ref="ROLLING" />
		</Logger>
	
		<Logger name="gov.va.med.cds.exceptionframework.DefaultLogger" level="ERROR">
			<AppenderRef ref="STDOUT" />
			<AppenderRef ref="ROLLING" />
		</Logger>
		
		<Logger name="gov.va.med.cds.psim.ims.AbstractImsPersonIdentifierManagment" level="ERROR"> 
			<AppenderRef ref="STDOUT" />
		</Logger>
		
		<!-- <Logger name="gov.va.med.cds.template.TemplateManager" level="WARN" additivity="false">
			<AppenderRef ref="ROLLING" />
			<AppenderRef ref="STDOUT" />
		</Logger>-->
		<!-- Logger name="org.hibernate.type" level="TRACE">
			<AppenderRef ref="STDOUT" />
		</Logger -->
	
	
		<!-- ======================= -->
		<!-- Setup logger       -->
		<!-- ======================= -->
		<Logger name="gov.va.med.exception.client" level="WARN" additivity="true">
			<!-- <AppenderRef ref="STDOUT" /> -->
			<AppenderRef ref="ROLLING" />
		</Logger>
	
		<Root level="ERROR">
			<AppenderRef ref="STDOUT" />
			<!-- <AppenderRef ref="ROLLING" /> -->
		</Root>
	</Loggers>

</Configuration>
