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

        WARNING:    Log4j 1.x has been deprecated in ESAPI since 2020-07-23 in
                    release 2.2.1.0.  It will be removed in a future release.
                    The new default for ESAPI logging is JUL.  Either switch
                    to JUL or SLF4J (which can support log4j 2). See the latest
                    release notes for further details.
  -->
<!-- main resources -->
<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/">

  <appender name="console" class="org.apache.log4j.ConsoleAppender"> 
    <param name="Target" value="System.out"/> 
    <layout class="org.apache.log4j.PatternLayout"> 
      <param name="ConversionPattern" value="%-5p %m%n"/> 
    </layout> 
  </appender>

    <appender name="file" class="org.apache.log4j.FileAppender">
        <param name="File" value="target/unit-tests.log"/>
        <layout class="org.apache.log4j.PatternLayout">
          <param name="ConversionPattern" value="%-5p %m%n"/>
        </layout>
    </appender>

  <logger name="org.owasp.esapi.reference.TestTrace">
    <level value="trace"/>
  </logger>

  <logger name="org.owasp.esapi.reference.TestDebug">
    <level value="debug"/>
  </logger>

  <logger name="org.owasp.esapi.reference.TestInfo">
    <level value="info"/>
 </logger>

  <logger name="org.owasp.esapi.reference.TestWarning">
    <level value="warn"/>
  </logger>

  <logger name="org.owasp.esapi.reference.TestError">
    <level value="error"/>
  </logger>

  <logger name="org.owasp.esapi.reference.TestFatal">
    <level value="fatal"/>
  </logger>

  <logger name="org.owasp.esapi.reference">
    <level value="info"/>
  </logger>

  <root>
    <priority value="debug" />
    <appender-ref ref="file" />
  </root>

  <loggerFactory class="org.owasp.esapi.logging.log4j.Log4JLoggerFactory"/>

</log4j:configuration>
