<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">

<log4j:configuration xmlns:log4j='http://jakarta.apache.org/log4j/'>

  <appender name="DEFAULT" class="org.apache.log4j.DailyRollingFileAppender">

    <param name="File" value="log/datastore_server_log.txt"/>
    <param name="DatePattern" value="'.'yyyy-MM-dd"/>

    <layout class="org.apache.log4j.PatternLayout">
      <param name="ConversionPattern" value="%d %-5p [%t] %c - %m%n"/>
    </layout>
  
  </appender>

  <appender name="STDOUT" class="org.apache.log4j.ConsoleAppender">
     <layout class="org.apache.log4j.PatternLayout">
       <param name="ConversionPattern" value="%d %-5p [%t] %c - %m%n"/>
     </layout>
  </appender>

  <appender name="NULL" class="org.apache.log4j.varia.NullAppender" />

  <appender name="EMAIL" class="org.apache.log4j.net.SMTPAppender">

    <param name="BufferSize" value="512" />
    <param name="SMTPHost" value="localhost" />
    <param name="From" value="screening-openbis@localhost" />
    <param name="To" value="openbis@localhost" />
    <param name="Subject" value="ATTENTION: Screening Data Set Server" />
    <param name="EvaluatorClass" value="ch.systemsx.cisd.common.logging.AlwaysTrueTriggeringEventEvaluator" />

    <layout class="org.apache.log4j.PatternLayout">
      <param name="ConversionPattern" value="%d %-5p [%t] %c - %m%n"/>
    </layout>
  
    <!--filter class="org.apache.log4j.varia.LevelRangeFilter">
      <param name="LevelMin" value="ERROR"/>
      <param name="LevelMax" value="FATAL"/>
    </filter-->
  
  </appender>

  <category name="NOTIFY">
    <priority value="info" />
    <appender-ref ref="DEFAULT" />
    <appender-ref ref="EMAIL" />
  </category>    

  <logger name="loci.formats.in">
    <!-- Print only messages of level warn or above from the BioFormats library -->
    <level value="warn"/> 
  </logger>
  
  <root>
    <priority value="info" />
    <appender-ref ref="DEFAULT" />
  </root>
  
</log4j:configuration>
