<?xml version="1.0" encoding="UTF-8"?>
<configuration debug="false" scan="false">

    <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
      <encoder>
        <pattern>%d{HH:mm:ss.SSS} %-5level [%thread]:[%logger] %msg%n</pattern>
      </encoder>
    </appender>
    
    <appender name="FILE" class="ch.qos.logback.core.FileAppender">
      <file>log/sebserver.log</file>
      <append>true</append>
      <encoder>
         <pattern>%d{HH:mm:ss.SSS} %-5level [%thread]:[%logger] %msg%n</pattern>
      </encoder>
   </appender>

  <springProfile name="dev">

    <root level="INFO" additivity="true">
      <appender-ref ref="STDOUT" />
      <appender-ref ref="FILE" />
    </root>

    <Logger name="ch.ethz.seb.sebserver.gui" level="INFO" additivity="true" />
    <Logger name="ch.ethz.seb.sebserver.webservice" level="INFO" additivity="true" />
    <Logger name="org.apache.ibatis.datasource" level="INFO" additivity="true" />
    <Logger name="org.mybatis" level="INFO" additivity="true" />
    <Logger name="org.mybatis.generator" level="INFO" additivity="true" />
    <Logger name="org.springframework.boot" level="INFO" additivity="true" />
    <Logger name="org.springframework.security" level="INFO" additivity="true" />
    
    <Logger name="org.springframework.security.oauth2.client.OAuth2RestTemplate" level="DEBUG" additivity="true" />
    
    <Logger name="org.springframework.context.support.ResourceBundleMessageSource" level="DEBUG" additivity="true" />

    <Logger name="org.springframework.web" level="INFO" additivity="true" />
    <Logger name="org.springframework.security.oauth2" level="INFO" additivity="true" />
    
    <Logger name="ch.ethz.seb.sebserver.webservice.servicelayer.sebconfig" level="INFO" additivity="true" />
    <Logger name="ch.ethz.seb.sebserver.webservice.servicelayer.session" level="DEBUG" additivity="true" />
    <Logger name="ch.ethz.seb.sebserver.webservice.servicelayer.lms.impl.edx" level="DEBUG" additivity="true" />
    
    <Logger name="ch.ethz.seb.sebserver.webservice.servicelayer.sebconfig.impl.SebExamConfigServiceImpl" level="TRACE" additivity="true" />
    
  </springProfile>
  
  <springProfile name="test">

    <root level="WARN" additivity="true">
      <appender-ref ref="STDOUT" />
    </root>
  </springProfile>
  
  <springProfile name="demo">

    <root level="INFO" additivity="true">
      <appender-ref ref="STDOUT" />
      <appender-ref ref="FILE" />
    </root>
    
    <Logger name="ch.ethz.seb.sebserver.webservice.servicelayer.sebconfig.impl.SebClientConfigServiceImpl" level="DEBUG" additivity="true" />
 
  </springProfile>
  
  <springProfile name="prod">

    <root level="INFO" additivity="true">
      <appender-ref ref="STDOUT" />
      <appender-ref ref="FILE" />
    </root>
    
  </springProfile>
  
</configuration>