<?xml version="1.0" encoding="UTF-8"?>
<configuration scan="true" scanPeriod="60 seconds" debug="FALSE">
   <property name="LOG_HOME" value="/Users/caojie/Dev/Application/WorkSpace_yg/CMBCSZ/logs" />
   <property name="APP_Name" value="SpeechData" />
   <contextName>${APP_Name}</contextName>
   
   <appender name="stdout" class="ch.qos.logback.core.ConsoleAppender">
    <filter class="ch.qos.logback.classic.filter.ThresholdFilter">
	  <level>INFO</level>
	</filter>  
    <encoder> 
      <pattern>%d{yyyy-MM-dd HH:mm:ss} [%level] %msg%n</pattern> 
    </encoder>
  </appender>
  
  <!-- debug logfile -->
  <appender name="debug-logfile" class="ch.qos.logback.core.rolling.RollingFileAppender">
    <file>${LOG_HOME}/DEBUG.log</file> 
    <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
      <!-- rollover daily -->
      <fileNamePattern>${LOG_HOME}/history/DEBUG_%d{yyyy-MM-dd}.log.%i.gz</fileNamePattern>
      <maxHistory>200</maxHistory>
      
      <timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
		<maxFileSize>200MB</maxFileSize>
	  </timeBasedFileNamingAndTriggeringPolicy>
    </rollingPolicy>

    <encoder>   
      <pattern>%d{yyyy-MM-dd HH:mm:ss} [%level] %logger{35}: %msg%n</pattern> 
    </encoder>
  </appender>
  
  <!-- logger logfile -->
  <appender name="logger-logfile" class="ch.qos.logback.core.rolling.RollingFileAppender">
    <file>${LOG_HOME}/INFO_SYSTEM.log</file> 
    <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
      <!-- rollover daily -->
      <fileNamePattern>${LOG_HOME}/history/INFO_SYSTEM_%d{yyyyMMdd}.log.%i.gz</fileNamePattern>
      <maxHistory>30</maxHistory>
      
      <timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
		<maxFileSize>50MB</maxFileSize>
	  </timeBasedFileNamingAndTriggeringPolicy>
    </rollingPolicy>

    <encoder>   
      <pattern>%d{yyyy-MM-dd HH:mm:ss} [%level] %logger{35}: %msg%n</pattern> 
    </encoder>
  </appender>
 
  <!-- logfile-error -->
  <appender name="logfile-error" class="ch.qos.logback.core.rolling.RollingFileAppender">
   <!--  <file>${LOG_HOME}/ERROR.log</file>  -->++++++++++++++++++++++++++++++++++++++++++++++++
    <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">   
      <fileNamePattern>${LOG_HOME}/history/ERROR_%d{yyyyMMdd}.log.%i.gz</fileNamePattern>
      <maxHistory>30</maxHistory>
      
      
      
      <timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
		<maxFileSize>50MB</maxFileSize>
	  </timeBasedFileNamingAndTriggeringPolicy>
    </rollingPolicy>
   
    <encoder>   
      <pattern>%d{yyyy-MM-dd HH:mm:ss} [%level] %msg%n</pattern>   
    </encoder>
  </appender>
  
  <!--==================================================================================--> 
  <logger name="LOGGER" level="DEBUG" additivity="false">
  	<appender-ref ref="stdout"/>
    <appender-ref ref="logger-logfile"/>
  </logger>
  
  <logger name="DEBUG" level="DEBUG" additivity="false">
  	<appender-ref ref="stdout"/>
    <appender-ref ref="debug-logfile"/>
  </logger>
  
  <logger name="ERROR" level="DEBUG" additivity="false">
    <appender-ref ref="stdout"/>
    <appender-ref ref="logfile-error"/>
  </logger>
  
</configuration>
