<?xml version="1.0"?>
<!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "https://www.eclipse.org/jetty/configure_10_0.dtd">

<!-- =============================================================== -->
<!-- Configure the Jetty Request Log                                 -->
<!-- =============================================================== -->
<Configure id="Server" class="org.eclipse.jetty.server.Server">

  <!-- =========================================================== -->
  <!-- Configure Request Log for Server                            -->
  <!-- (Use RequestLogHandler for a context specific RequestLog    -->
  <!-- =========================================================== -->
  <Set name="RequestLog">
    <New id="RequestLog" class="org.eclipse.jetty.server.CustomRequestLog">
      <!-- Writer -->
      <Arg>
        <New class="org.eclipse.jetty.server.AsyncRequestLogWriter">
          <Arg>
            <Call name="resolvePath" class="org.eclipse.jetty.xml.XmlConfiguration">
              <Arg><Property name="jetty.base"/></Arg>
              <Arg>
                <Property name="jetty.requestlog.filePath">
                  <Default>
                    <Property name="jetty.requestlog.dir" default="logs"/>/yyyy_mm_dd.request.log
                  </Default>
                </Property>
              </Arg>
            </Call>
          </Arg>

          <Set name="filenameDateFormat"><Property name="jetty.requestlog.filenameDateFormat" default="yyyy_MM_dd"/></Set>
          <Set name="retainDays"><Property name="jetty.requestlog.retainDays" default="90"/></Set>
          <Set name="append"><Property name="jetty.requestlog.append" default="false"/></Set>
          <Set name="timeZone"><Property name="jetty.requestlog.timezone" default="GMT"/></Set>
        </New>
      </Arg>

      <!-- Format String -->
      <Arg>
        <Property name="jetty.requestlog.formatString" deprecated="jetty.customrequestlog.formatString">
          <Default>
            <Get class="org.eclipse.jetty.server.CustomRequestLog" name="EXTENDED_NCSA_FORMAT"/>
          </Default>
        </Property>
      </Arg>
    </New>
  </Set>
</Configure>
