<?xml version="1.0" encoding="UTF-8" ?>
<!--
  ~ Licensed to the Apache Software Foundation (ASF) under one
  ~ or more contributor license agreements.  See the NOTICE file
  ~ distributed with this work for additional information
  ~ regarding copyright ownership.  The ASF licenses this file
  ~ to you under the Apache License, Version 2.0 (the
  ~ "License"); you may not use this file except in compliance
  ~ with the License.  You may obtain a copy of the License at
  ~
  ~   http://www.apache.org/licenses/LICENSE-2.0
  ~
  ~ Unless required by applicable law or agreed to in writing,
  ~ software distributed under the License is distributed on an
  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  ~ KIND, either express or implied.  See the License for the
  ~ specific language governing permissions and limitations
  ~ under the License.
  -->


<configuration>

  <properties>
    <property name="logsDirectory">${sys:appserver.base}/logs</property>
  </properties>

  <appenders>

    <RollingRandomAccessFile name="rolling" fileName="${logsDirectory}/archiva.log"
                 filePattern="${logsDirectory}/archiva-%d{yyyyMMdd}.log"
                 immediateFlush="true" append="true">
      <PatternLayout>
        <pattern>%d [%t] %-5p %c %x - %m%n</pattern>
      </PatternLayout>
      <Policies>
        <TimeBasedTriggeringPolicy />
      </Policies>
    </RollingRandomAccessFile>

    <RollingRandomAccessFile name="auditlog" fileName="${logsDirectory}/archiva-audit.log"
                 filePattern="${logsDirectory}/archiva-audit-%d{yyyyMMdd}.log"
                 immediateFlush="true" append="true">
      <PatternLayout>
        <pattern>%d{yyyy-MM-dd HH:mm:ss} %m%n</pattern>
      </PatternLayout>
      <Policies>
        <TimeBasedTriggeringPolicy />
      </Policies>
    </RollingRandomAccessFile>

  </appenders>
  <loggers>

    <logger name="org.apache.archiva.AuditLog" additivity="false" level="info">
      <appender-ref ref="auditlog" />
    </logger>

  <!-- INFO level loggers can use the default
   <logger name="org.apache.archiva.consumers" level="info"/>

   <logger name="org.apache.archiva" level="info"/>

   <logger name="org.quartz" level="info"/>

   <logger name="org.apache.jasper" level="info"/>

   <logger name="com.opensymphony.xwork2" level="info"/>

   <logger name="org.apache.struts2" level="info"/>

  -->

    <!-- WebDav objects -->
    <logger name="org.apache.archiva.webdav.ArchivaDavResource" level="info"/>

    <logger name="org.apache.archiva.webdav.ArchivaDavResourceFactory" level="info"/>

    <!-- squelch noisy objects (for now) -->
    <logger name="org.apache.commons" level="warn"/>

    <logger name="net.sf.ehcache" level="warn"/>

    <!-- retained for Redback -->
    <logger name="JPOX" level="warn"/>

    <logger name="JPOX.MetaData" level="error"/>

    <logger name="JPOX.RDBMS.SQL" level="error"/>

    <logger name="SQL" level="error"/>

    <logger name="org.apache.commons.configuration.DefaultConfigurationBuilder" level="error"/>

    <!-- debug wagon transfer -->
    <!--
    <logger name="org.apache.archiva.proxy.common" level="debug"/>

    -->
    <!-- apache httpclient debug content transfer verbose -->
    <!--
    <logger name="org.apache.http.wire" level="debug"/>

    -->
    <!-- apache httpclient log headers -->
    <!--
    <logger name="org.apache.http.headers" level="debug"/>

    -->

    <root level="info" includeLocation="true">
      <appender-ref ref="rolling"/>
    </root>
  </loggers>
</configuration>


