<?xml version="1.0" encoding="UTF-8" ?>
<Configuration status="trace" packages="gov.va.med.cds.log4j">
	<Properties>
		<Property name="log-path">servers/${sys:weblogic.Name}/logs</Property>
	</Properties>
	<Appenders>
		<RollingFile name="ROLLING" fileName="${log-path}/development.log"
			filePattern="${log-path}/development-%i.log">
			<PatternLayout pattern="%-6r %d{ISO8601} [%15.15t] %-5p %30.30c %x - %m%n" />
			<Policies>
				<SizeBasedTriggeringPolicy size="5 MB" />
			</Policies>
			<DefaultRolloverStrategy max="3"/>
		</RollingFile>	

		<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>

    	<RollingFile name="PERFORMANCE" fileName="${log-path}/performance-log.csv"
				filePattern="${log-path}/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="PERFORMANCE_ASYNC" bufferSize="500">
	        <AppenderRef ref="PERFORMANCE"/>
	    </Async>
	</Appenders>
	<Loggers>
		<Logger name="gov.va.med.cds" level="ERROR">
		    <AppenderRef ref="JMS"/>
		</Logger>
		
		<Logger name="gov.va.med.cds.util.PerformanceLog" level="INFO">
		    <AppenderRef ref="PERFORMANCE_ASYNC"/>
		</Logger>
			
		<Logger name="gov.va.med.cds.persistence.hibernate.SiteSpecificHibernateReadPersistenceManagerFactory" level="INFO" additivity="false">
		    <AppenderRef ref="ROLLING"/>
		</Logger>

		<Logger name="gov.va.med.cds.persistence.JNDIDataSourceBindingsLocator" level="DEBUG">
		    <AppenderRef ref="ROLLING"/>
		</Logger>

		<Logger name="org.apache.beehive" level="WARN"/>
		
		<Logger name="org.hibernate.cfg.SettingsFactory" level="ERROR"/>
		
		<Logger name="org.hibernate.dialect.lock" level="ERROR"/>
			
		<Logger name="org.hibernate" level="WARN"/>
		
		<Logger name="org.springframework" level="WARN"/>

		<Root level="ERROR">
			<AppenderRef ref="ROLLING" />
		</Root>
	</Loggers>
	
</Configuration>

