<?xml version="1.0" encoding="UTF-8"?>
<!--

    Copyright 2018 Scytl Secure Electronic Voting SA

    All rights reserved

    See our extended copyright notice in *file 'Copyright.txt' which is part of this source code package

-->
<Configuration status="warn" name="MyApp" packages="">

  <Appenders>
  
	<Console name="STDOUT" target="SYSTEM_OUT">
		<PatternLayout pattern="%d{yyyy-MM-dd HH:mm:ss,SSS}|%p|%t|%m%n" />
	</Console>
 
    <RollingFile name="InfoFile" fileName="./target/logs/info-log4j2.log"
                 filePattern="logs/info-%d{MM-dd-yyyy}.log.gz">
      <ThresholdFilter level="INFO" onMatch="ACCEPT" onMismatch="DENY"/>
      <PatternLayout>
        <pattern>%d{yyyy-MM-dd HH:mm:ss,SSS}|%p|%t|%m%n</pattern>
      </PatternLayout>
      <TimeBasedTriggeringPolicy />
    </RollingFile>
    
    <RollingFile name="ErrorFile" fileName="./target/logs/error-log4j2.log"
                 filePattern="logs/error-%d{MM-dd-yyyy}.log.gz">
      <ThresholdFilter level="ERROR" onMatch="ACCEPT" onMismatch="DENY"/>
      <PatternLayout>
        <pattern>%d{yyyy-MM-dd HH:mm:ss,SSS}|%p|%t|%m%n</pattern>
      </PatternLayout>
      <TimeBasedTriggeringPolicy />
    </RollingFile>
    
     <RollingFile name="DebugFile" fileName="./target/logs/debug-log4j2.log"
                 filePattern="logs/debug-%d{MM-dd-yyyy}.log.gz">
      <ThresholdFilter level="DEBUG" onMatch="ACCEPT" onMismatch="DENY"/>
      <PatternLayout>
        <pattern>%d{yyyy-MM-dd HH:mm:ss,SSS}|%p|%t|%m%n</pattern>
      </PatternLayout>
      <TimeBasedTriggeringPolicy />
    </RollingFile>
    
     <RollingFile name="WarnFile" fileName="./target/logs/warn-log4j2.log"
                 filePattern="logs/warn-%d{MM-dd-yyyy}.log.gz">
      <ThresholdFilter level="WARN" onMatch="ACCEPT" onMismatch="DENY"/>
      <PatternLayout>
        <pattern>%d{yyyy-MM-dd HH:mm:ss,SSS}|%p|%t|%m%n</pattern>
      </PatternLayout>
      <TimeBasedTriggeringPolicy />
    </RollingFile>
    
  </Appenders>
  
  <Loggers>
    <Root level="debug">
      <AppenderRef ref="InfoFile"/>
      <AppenderRef ref="ErrorFile"/>
      <AppenderRef ref="DebugFile"/>
      <AppenderRef ref="WarnFile"/>
      <AppenderRef ref="STDOUT"/>
    </Root>
  </Loggers>
  
</Configuration>
