<?xml version="1.0" encoding="UTF-8"?>
<ae:configurations xmlns:ae="http://agavi.org/agavi/config/global/envelope/1.0" xmlns="http://agavi.org/agavi/config/parts/logging/1.0">
	
	<ae:configuration>
		
		<loggers default="default">
			<!-- logs only DEBUG messages -->
			<logger name="debug" class="AgaviLogger" level="AgaviLogger::DEBUG">
				<appenders>
					<appender>DebugLogAppender</appender>
				</appenders>
			</logger>
			
			<!-- logs only INFO messages -->
			<logger name="default" class="AgaviLogger" level="AgaviLogger::INFO">
				<appenders>
					<appender>ApplicationLogAppender</appender>
				</appenders>
			</logger>
			
			<!-- logs everything but DEBUG and INFO messages -->
			<logger name="error" class="AgaviLogger" level="AgaviLogger::ALL ^ AgaviLogger::DEBUG ^ AgaviLogger::INFO">
				<appenders>
					<appender>ErrorLogAppender</appender>
					<appender>StdErrorAppender</appender> 
				</appenders>
			</logger>
		</loggers>
		
		<appenders>
			<!--
				Debug logs are rotated in a 7 day (AgaviRotatingFileLoggerAppender default) cycle
				Use 'cycle' parameter to alter the cycle.
			-->
			<appender name="DebugLogAppender" class="AgaviRotatingFileLoggerAppender" layout="DateTimeLayout">
				<ae:parameters>
					<ae:parameter name="dir">%core.app_dir%/log/</ae:parameter>
					<ae:parameter name="prefix">debug-</ae:parameter>
				</ae:parameters>
			</appender>
			
			<appender name="ApplicationLogAppender" class="AgaviFileLoggerAppender" layout="DateTimeLayout">
				<ae:parameters>
					<ae:parameter name="file">%core.app_dir%/log/application.log</ae:parameter>
				</ae:parameters>
			</appender>
			
			<appender name="ErrorLogAppender" class="AgaviRotatingFileLoggerAppender" layout="DateTimeLayout">
				<ae:parameters>
					<ae:parameter name="dir">%core.app_dir%/log/</ae:parameter>
					<ae:parameter name="prefix">error-</ae:parameter>
				</ae:parameters>
			</appender>
			
			<appender name="StdErrorAppender" class="AgaviStderrLoggerAppender" layout="DateTimeLayout" />
		</appenders>
		
		<layouts>
			<layout name="DateTimeLayout" class="AgaviTimestampLoggerLayout" />
		</layouts>
		
	</ae:configuration>
	
</ae:configurations>