]> source.dussan.org Git - archiva.git/commitdiff
use asyncLogger and FastRollingFile from log4j2
authorOlivier Lamy <olamy@apache.org>
Fri, 26 Apr 2013 14:24:56 +0000 (14:24 +0000)
committerOlivier Lamy <olamy@apache.org>
Fri, 26 Apr 2013 14:24:56 +0000 (14:24 +0000)
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1476216 13f79535-47bb-0310-9956-ffa450edef68

archiva-modules/archiva-web/archiva-webapp/src/main/resources/log4j2.xml

index c36bbc4e1832cb76fd72ce26ab0d56b722888462..4738bd3624cf64066c2db4fa8627b8e34df65871 100644 (file)
 
   <appenders>
 
-    <RollingFile name="rolling" fileName="${logsDirectory}/archiva.log"
-                 filePattern="${logsDirectory}/archiva-%d{MM-dd-yyyy}.log">
+    <FastRollingFile name="rolling" fileName="${logsDirectory}/archiva.log"
+                 filePattern="${logsDirectory}/archiva-%d{MM-dd-yyyy}.log"
+                 immediateFlush="false" append="true">
       <PatternLayout>
         <pattern>%d [%t] %-5p %c %x - %m%n</pattern>
       </PatternLayout>
       <Policies>
         <TimeBasedTriggeringPolicy />
       </Policies>
-    </RollingFile>
+    </FastRollingFile>
 
-    <RollingFile name="auditlog" fileName="${logsDirectory}/archiva-audit.log"
-                 filePattern="${logsDirectory}/logs/archiva-audit-%d{MM-dd-yyyy}.log">
+    <FastRollingFile name="auditlog" fileName="${logsDirectory}/archiva-audit.log"
+                 filePattern="${logsDirectory}/logs/archiva-audit-%d{MM-dd-yyyy}.log"
+                 immediateFlush="false" append="true">
       <PatternLayout>
         <pattern>%d{yyyy-MM-dd HH:mm:ss} %m%n</pattern>
       </PatternLayout>
       <Policies>
         <TimeBasedTriggeringPolicy />
       </Policies>
-    </RollingFile>
+    </FastRollingFile>
 
-    <RollingFile name="redbackAuditLog" fileName="${logsDirectory}/archiva-security-audit.log"
-                 filePattern="${logsDirectory}/archiva-security-audit.log-%d{MM-dd-yyyy}.log">
+    <FastRollingFile name="redbackAuditLog" fileName="${logsDirectory}/archiva-security-audit.log"
+                 filePattern="${logsDirectory}/archiva-security-audit.log-%d{MM-dd-yyyy}.log"
+                 immediateFlush="false" append="true">
       <PatternLayout>
         <pattern>%d{yyyy-MM-dd HH:mm:ss} - %X{redback.currentUser} - %m%n</pattern>
       </PatternLayout>
       <Policies>
         <TimeBasedTriggeringPolicy />
       </Policies>
-    </RollingFile>
+    </FastRollingFile>
 
   </appenders>
   <loggers>
 
-    <logger name="org.apache.archiva.redback.struts2.action.AuditEvent" additivity="false" level="info">
+    <asyncLogger name="org.apache.archiva.redback.struts2.action.AuditEvent" additivity="false" level="info">
       <appender-ref ref="redbackAuditLog" />
-    </logger>
+    </asyncLogger>
 
-    <logger name="org.apache.archiva.AuditLog" additivity="false" level="info">
+    <asyncLogger name="org.apache.archiva.AuditLog" additivity="false" level="info">
       <appender-ref ref="auditlog" />
-    </logger>
+    </asyncLogger>
 
   <!-- INFO level loggers can use the default
-   <logger name="org.apache.archiva.consumers" level="info"/>
+   <asyncLogger name="org.apache.archiva.consumers" level="info"/>
 
-    <logger name="org.apache.archiva" level="info"/>
+   <asyncLogger name="org.apache.archiva" level="info"/>
 
+   <asyncLogger name="org.quartz" level="info"/>
 
-    <logger name="org.quartz" level="info"/>
+   <asyncLogger name="org.apache.jasper" level="info"/>
 
-    <logger name="org.apache.jasper" level="info"/>
+   <asyncLogger name="com.opensymphony.xwork2" level="info"/>
 
-    <logger name="com.opensymphony.xwork2" level="info"/>
-
-    <logger name="org.apache.struts2" level="info"/>
+   <asyncLogger 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"/>
+    <asyncLogger name="org.apache.archiva.webdav.ArchivaDavResource" level="info"/>
 
+    <asyncLogger 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"/>
+    <asyncLogger name="org.apache.commons" level="warn"/>
 
+    <asyncLogger 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"/>
-
+    <asyncLogger name="JPOX" level="warn"/>
 
-    <logger name="SQL" level="error"/>
+    <asyncLogger name="JPOX.MetaData" level="error"/>
 
+    <asyncLogger name="JPOX.RDBMS.SQL" level="error"/>
 
+    <asyncLogger name="SQL" level="error"/>
 
-    <logger name="org.apache.commons.configuration.DefaultConfigurationBuilder" level="error"/>
+    <asyncLogger name="org.apache.commons.configuration.DefaultConfigurationBuilder" level="error"/>
 
     <!-- debug wagon transfer -->
     <!--
-    <logger name="org.apache.archiva.proxy.common" level="debug"/>
+    <asyncLogger name="org.apache.archiva.proxy.common" level="debug"/>
 
     -->
     <!-- apache httpclient debug content transfer verbose -->
     <!--
-    <logger name="org.apache.http.wire" level="debug"/>
+    <asyncLogger name="org.apache.http.wire" level="debug"/>
 
     -->
     <!-- apache httpclient log headers -->
     <!--
-    <logger name="org.apache.http.headers" level="debug"/>
+    <asyncLogger name="org.apache.http.headers" level="debug"/>
 
     -->
 
-    <root level="info">
+    <asyncRoot level="info" includeLocation="true">
       <appender-ref ref="rolling"/>
-    </root>
+    </asyncRoot>
   </loggers>
 </configuration>