]> source.dussan.org Git - archiva.git/commitdiff
put log directory in a property for log4j2 files
authorOlivier Lamy <olamy@apache.org>
Sun, 9 Sep 2012 22:25:50 +0000 (22:25 +0000)
committerOlivier Lamy <olamy@apache.org>
Sun, 9 Sep 2012 22:25:50 +0000 (22:25 +0000)
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1382601 13f79535-47bb-0310-9956-ffa450edef68

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

index 52a145d9ecce51321eafaf627b6dc399e5d4fc5f..17b8a2079b578c4f39f1d86d214f689dc1d3ff61 100644 (file)
 
 <configuration>
 
+  <properties>
+    <property name="logsDirectory">${sys:appserver.base}/logs</property>
+  </properties>
+
   <appenders>
 
-    <RollingFile name="rolling" fileName="${appserver.base}/logs/archiva.log"
-                 filePattern="${appserver.base}/logs/archiva-%d{MM-dd-yy-HH-mm}.log">
+    <RollingFile name="rolling" fileName="${logsDirectory}/archiva.log"
+                 filePattern="${logsDirectory}/archiva-%d{MM-dd-yy-HH-mm}.log">
       <PatternLayout>
         <pattern>%d [%t] %-5p %c %x - %m%n</pattern>
       </PatternLayout>
@@ -33,8 +37,8 @@
       </Policies>
     </RollingFile>
 
-    <RollingFile name="auditlog" fileName="${appserver.base}/logs/archiva-audit.log"
-                 filePattern="${appserver.base}/logs/archiva-audit-%d{MM-dd-yy-HH-mm}.log">
+    <RollingFile name="auditlog" fileName="${logsDirectory}/archiva-audit.log"
+                 filePattern="${logsDirectory}/logs/archiva-audit-%d{MM-dd-yy-HH-mm}.log">
       <PatternLayout>
         <pattern>%d{yyyy-MM-dd HH:mm:ss} %m%n</pattern>
       </PatternLayout>
@@ -43,8 +47,8 @@
       </Policies>
     </RollingFile>
 
-    <RollingFile name="redbackAuditLog" fileName="${appserver.base}/logs/archiva-security-audit.log"
-                 filePattern="${appserver.base}/logs/archiva-security-audit.log-%d{MM-dd-yy-HH-mm}.log">
+    <RollingFile name="redbackAuditLog" fileName="${logsDirectory}/archiva-security-audit.log"
+                 filePattern="${logsDirectory}/archiva-security-audit.log-%d{MM-dd-yy-HH-mm}.log">
       <PatternLayout>
         <pattern>%d{yyyy-MM-dd HH:mm:ss} - %X{redback.currentUser} - %m%n</pattern>
       </PatternLayout>
index 52a145d9ecce51321eafaf627b6dc399e5d4fc5f..17b8a2079b578c4f39f1d86d214f689dc1d3ff61 100644 (file)
 
 <configuration>
 
+  <properties>
+    <property name="logsDirectory">${sys:appserver.base}/logs</property>
+  </properties>
+
   <appenders>
 
-    <RollingFile name="rolling" fileName="${appserver.base}/logs/archiva.log"
-                 filePattern="${appserver.base}/logs/archiva-%d{MM-dd-yy-HH-mm}.log">
+    <RollingFile name="rolling" fileName="${logsDirectory}/archiva.log"
+                 filePattern="${logsDirectory}/archiva-%d{MM-dd-yy-HH-mm}.log">
       <PatternLayout>
         <pattern>%d [%t] %-5p %c %x - %m%n</pattern>
       </PatternLayout>
@@ -33,8 +37,8 @@
       </Policies>
     </RollingFile>
 
-    <RollingFile name="auditlog" fileName="${appserver.base}/logs/archiva-audit.log"
-                 filePattern="${appserver.base}/logs/archiva-audit-%d{MM-dd-yy-HH-mm}.log">
+    <RollingFile name="auditlog" fileName="${logsDirectory}/archiva-audit.log"
+                 filePattern="${logsDirectory}/logs/archiva-audit-%d{MM-dd-yy-HH-mm}.log">
       <PatternLayout>
         <pattern>%d{yyyy-MM-dd HH:mm:ss} %m%n</pattern>
       </PatternLayout>
@@ -43,8 +47,8 @@
       </Policies>
     </RollingFile>
 
-    <RollingFile name="redbackAuditLog" fileName="${appserver.base}/logs/archiva-security-audit.log"
-                 filePattern="${appserver.base}/logs/archiva-security-audit.log-%d{MM-dd-yy-HH-mm}.log">
+    <RollingFile name="redbackAuditLog" fileName="${logsDirectory}/archiva-security-audit.log"
+                 filePattern="${logsDirectory}/archiva-security-audit.log-%d{MM-dd-yy-HH-mm}.log">
       <PatternLayout>
         <pattern>%d{yyyy-MM-dd HH:mm:ss} - %X{redback.currentUser} - %m%n</pattern>
       </PatternLayout>