]> source.dussan.org Git - archiva.git/commitdiff
[MRM-1660] use log4j2
authorOlivier Lamy <olamy@apache.org>
Sun, 9 Sep 2012 15:38:26 +0000 (15:38 +0000)
committerOlivier Lamy <olamy@apache.org>
Sun, 9 Sep 2012 15:38:26 +0000 (15:38 +0000)
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1382518 13f79535-47bb-0310-9956-ffa450edef68

31 files changed:
archiva-modules/archiva-base/archiva-consumers/archiva-consumer-archetype/pom.xml
archiva-modules/archiva-base/archiva-consumers/archiva-consumer-archetype/src/main/resources/archetype-resources/pom.xml
archiva-modules/archiva-base/archiva-consumers/archiva-consumer-archetype/src/main/resources/archetype-resources/src/test/resources/log4j.xml [deleted file]
archiva-modules/archiva-base/archiva-consumers/archiva-consumer-archetype/src/main/resources/archetype-resources/src/test/resources/log4j2-test.xml [new file with mode: 0644]
archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/pom.xml
archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/test/resources/log4j.xml [deleted file]
archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/test/resources/log4j2-test.xml [new file with mode: 0644]
archiva-modules/archiva-scheduler/archiva-scheduler-indexing/src/test/resources/log4j.xml [deleted file]
archiva-modules/archiva-scheduler/archiva-scheduler-indexing/src/test/resources/log4j2-test.xml [new file with mode: 0644]
archiva-modules/archiva-web/archiva-rest/archiva-rest-services/pom.xml
archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/test/resources/log4j.xml [deleted file]
archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/test/resources/log4j2-test.xml [new file with mode: 0644]
archiva-modules/archiva-web/archiva-web-common/pom.xml
archiva-modules/archiva-web/archiva-web-common/src/test/resources/log4j.xml [deleted file]
archiva-modules/archiva-web/archiva-web-common/src/test/resources/log4j2-test.xml [new file with mode: 0644]
archiva-modules/archiva-web/archiva-webapp-js/pom.xml
archiva-modules/archiva-web/archiva-webapp-js/src/main/resources/log4j.xml [deleted file]
archiva-modules/archiva-web/archiva-webapp-js/src/main/resources/log4j2.xml [new file with mode: 0644]
archiva-modules/archiva-web/archiva-webapp-js/src/test/resources/log4j2-test.xml [new file with mode: 0644]
archiva-modules/archiva-web/archiva-webapp/pom.xml
archiva-modules/archiva-web/archiva-webapp/src/main/resources/log4j2.xml [new file with mode: 0644]
archiva-modules/archiva-web/archiva-webapp/src/test/resources/log4j.xml [deleted file]
archiva-modules/archiva-web/archiva-webapp/src/test/resources/log4j2-test.xml [new file with mode: 0644]
archiva-modules/archiva-web/archiva-webapp/src/test/tomcat/log4j.xml [deleted file]
archiva-modules/archiva-web/archiva-webapp/src/test/tomcat/log4j2-test.xml [new file with mode: 0644]
archiva-modules/plugins/maven2-repository/pom.xml
archiva-modules/plugins/metadata-store-jcr/pom.xml
archiva-modules/plugins/stage-repository-merge/pom.xml
archiva-modules/plugins/stage-repository-merge/src/test/resources/log4j.xml [deleted file]
archiva-modules/plugins/stage-repository-merge/src/test/resources/log4j2-test.xml [new file with mode: 0644]
pom.xml

index 935e2ef208676e78b48a5f8f0560c299d14ac9de..2662c2d54909b2d62afd08f7070a85866aa31b23 100644 (file)
@@ -92,7 +92,7 @@
         <version>${archetypeVersion}</version>
         <configuration>
           <settingsFile>${basedir}/src/test/test-settings.xml</settingsFile>
-          <localRepositoryPath>${basedir}/target/local-repo</localRepositoryPath>
+          <localRepositoryPath>${project.build.directory}/local-repo</localRepositoryPath>
         </configuration>
       </plugin>
     </plugins>
index 81d1f64dfa27c37f05d77a9b8e44b9370b2b164e..3659cb38efb4ab92e6cfe2e591ab5003b1be0835 100644 (file)
@@ -35,6 +35,8 @@
   <properties>
     <archiva.version>${archivaVersion}</archiva.version>
     <wagonVersion>${wagon.version}</wagonVersion>
+    <slf4jVersion>${slf4j.version}</slf4jVersion>
+    <log4jVersion>${log4j.version}</log4jVersion>
   </properties>
   <dependencies>
     <dependency>
     <dependency>
       <groupId>org.slf4j</groupId>
       <artifactId>slf4j-api</artifactId>
-      <version>1.6.4</version>
+      <version>${slf4jVersion}</version>
     </dependency>
+
     <dependency>
-      <groupId>org.slf4j</groupId>
-      <artifactId>slf4j-log4j12</artifactId>
-      <version>1.6.4</version>
-      <scope>provided</scope>
+      <groupId>org.apache.logging.log4j</groupId>
+      <artifactId>log4j-core</artifactId>
+      <version>${log4jVersion}</version>
+      <scope>runtime</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.logging.log4j</groupId>
+      <artifactId>log4j12-api</artifactId>
+      <version>${log4jVersion}</version>
+      <scope>runtime</scope>
     </dependency>
+    <dependency>
+      <groupId>org.apache.logging.log4j</groupId>
+      <artifactId>slf4j-impl</artifactId>
+      <version>${log4jVersion}</version>
+      <scope>runtime</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.logging.log4j</groupId>
+      <artifactId>log4j-jcl</artifactId>
+      <version>${log4jVersion}</version>
+      <scope>runtime</scope>
+    </dependency>
+
     <dependency>
       <groupId>org.apache.archiva</groupId>
       <artifactId>archiva-repository-admin-default</artifactId>
diff --git a/archiva-modules/archiva-base/archiva-consumers/archiva-consumer-archetype/src/main/resources/archetype-resources/src/test/resources/log4j.xml b/archiva-modules/archiva-base/archiva-consumers/archiva-consumer-archetype/src/main/resources/archetype-resources/src/test/resources/log4j.xml
deleted file mode 100644 (file)
index 7780ac8..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-<?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.
-  -->
-
-<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
-
-<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/">
-
-  <appender name="console" class="org.apache.log4j.ConsoleAppender">
-    <layout class="org.apache.log4j.PatternLayout">
-      <param name="ConversionPattern" value="%d [%t] %-5p %c %x - %m%n"/>
-    </layout>
-  </appender>
-
-  <root>
-    <priority value ="info" />
-    <appender-ref ref="console" />
-  </root>
-
-</log4j:configuration>
diff --git a/archiva-modules/archiva-base/archiva-consumers/archiva-consumer-archetype/src/main/resources/archetype-resources/src/test/resources/log4j2-test.xml b/archiva-modules/archiva-base/archiva-consumers/archiva-consumer-archetype/src/main/resources/archetype-resources/src/test/resources/log4j2-test.xml
new file mode 100644 (file)
index 0000000..814779b
--- /dev/null
@@ -0,0 +1,38 @@
+<?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 status="debug">
+  <appenders>
+    <Console name="console" target="SYSTEM_OUT">
+      <PatternLayout pattern="%d [%t] %-5p %c %x - %m%n"/>
+    </Console>
+  </appenders>
+  <loggers>
+
+    <logger name="org.springframework" level="info"/>
+
+    <root level="info">
+      <appender-ref ref="console"/>
+    </root>
+  </loggers>
+</configuration>
+
+
index dee96f39b95d3ab52b7ffe85d8605a0616176e1d..690cd4e0ea2441083e53df2dde821504ffff458f 100644 (file)
       <scope>test</scope>
     </dependency>
 
+    <dependency>
+      <groupId>org.apache.logging.log4j</groupId>
+      <artifactId>slf4j-impl</artifactId>
+      <scope>test</scope>
+    </dependency>
+
     <dependency>
       <groupId>org.apache.archiva.redback</groupId>
       <artifactId>redback-users-memory</artifactId>
diff --git a/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/test/resources/log4j.xml b/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/test/resources/log4j.xml
deleted file mode 100644 (file)
index 9b1a658..0000000
+++ /dev/null
@@ -1,49 +0,0 @@
-<?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.
-  -->
-
-<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
-
-<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/">
-
-  <appender name="console" class="org.apache.log4j.ConsoleAppender">
-    <layout class="org.apache.log4j.PatternLayout">
-      <param name="ConversionPattern" value="%d [%t] %-5p %c %x - %m%n"/>
-    </layout>
-  </appender>
-
-
-
-  <logger name="org.apache.archiva.admin.repository.managed" >
-    <level value="debug"/>
-  </logger>
-  <logger name="JPOX">
-    <level value="ERROR"/>
-  </logger>
-
-  <logger name="org.springframework">
-    <level value="error"/>
-  </logger>
-
-  <root>
-    <priority value ="info" />
-    <appender-ref ref="console" />
-  </root>
-
-</log4j:configuration>
diff --git a/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/test/resources/log4j2-test.xml b/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/test/resources/log4j2-test.xml
new file mode 100644 (file)
index 0000000..77854ad
--- /dev/null
@@ -0,0 +1,44 @@
+<?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 status="debug">
+  <appenders>
+    <Console name="console" target="SYSTEM_OUT">
+      <PatternLayout pattern="%d{HH:mm:ss.SSS} [%t] %-5level %logger{36} - %msg%n"/>
+    </Console>
+  </appenders>
+  <loggers>
+
+    <logger name="org.apache.archiva.admin.repository.managed" level="debug"/>
+
+    <logger name="JPOX" level="error"/>
+
+
+    <logger name="org.springframework" level="error"/>
+
+
+    <root level="info">
+      <appender-ref ref="console"/>
+    </root>
+  </loggers>
+</configuration>
+
+
diff --git a/archiva-modules/archiva-scheduler/archiva-scheduler-indexing/src/test/resources/log4j.xml b/archiva-modules/archiva-scheduler/archiva-scheduler-indexing/src/test/resources/log4j.xml
deleted file mode 100644 (file)
index c9dfce9..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-<?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.
-  -->
-
-<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
-
-<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/">
-
-  <appender name="console" class="org.apache.log4j.ConsoleAppender">
-    <layout class="org.apache.log4j.PatternLayout">
-      <param name="ConversionPattern" value="%d [%t] %-5p %c %x - %m%n"/>
-    </layout>
-  </appender>
-
-  <logger name="org.springframework">
-    <level value="ERROR"/>
-  </logger>
-
-  <logger name="org.apache.archiva.scheduler.indexing">
-    <level value="debug"/>
-  </logger>
-
-  <root>
-    <priority value ="info" />
-    <appender-ref ref="console" />
-  </root>
-
-</log4j:configuration>
diff --git a/archiva-modules/archiva-scheduler/archiva-scheduler-indexing/src/test/resources/log4j2-test.xml b/archiva-modules/archiva-scheduler/archiva-scheduler-indexing/src/test/resources/log4j2-test.xml
new file mode 100644 (file)
index 0000000..740df69
--- /dev/null
@@ -0,0 +1,40 @@
+<?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 status="debug">
+  <appenders>
+    <Console name="console" target="SYSTEM_OUT">
+      <PatternLayout pattern="%d [%t] %-5p %c %x - %m%n"/>
+    </Console>
+  </appenders>
+  <loggers>
+
+    <logger name="org.springframework" level="error"/>
+
+    <logger name="org.apache.archiva.scheduler.indexing" level="debug"/>
+
+    <root level="info">
+      <appender-ref ref="console"/>
+    </root>
+  </loggers>
+</configuration>
+
+
index 77f970c04a0d957daed2d02aed6c715a4cba41d6..a1a812d39bf9a2bdcabb67c2cd002f9ff44d54d0 100644 (file)
       <scope>test</scope>
     </dependency>
 
+    <dependency>
+      <groupId>org.apache.logging.log4j</groupId>
+      <artifactId>slf4j-impl</artifactId>
+      <scope>test</scope>
+    </dependency>
+
     <dependency>
       <groupId>org.hsqldb</groupId>
       <artifactId>hsqldb</artifactId>
diff --git a/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/test/resources/log4j.xml b/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/test/resources/log4j.xml
deleted file mode 100644 (file)
index 8451b62..0000000
+++ /dev/null
@@ -1,56 +0,0 @@
-<?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.
-  -->
-
-<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
-
-<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/">
-
-  <appender name="console" class="org.apache.log4j.ConsoleAppender">
-    <layout class="org.apache.log4j.PatternLayout">
-      <param name="ConversionPattern" value="%d [%t] %-5p %c %x - %m%n"/>
-    </layout>
-  </appender>
-  <!--
-  <logger name="org.apache.cxf.jaxrs.interceptor.JAXRSInInterceptor">
-    <level value="trace"/>
-  </logger>
-  <logger name="org.apache.cxf.jaxrs.utils.JAXRSUtils">
-    <level value="trace"/>
-  </logger>
-  -->
-
-
-  <logger name="org.codehaus.redback.rest.services" >
-    <level value="ERROR"/>
-  </logger>
-  <logger name="JPOX">
-    <level value="ERROR"/>
-  </logger>
-
-  <logger name="org.springframework">
-    <level value="ERROR"/>
-  </logger>
-
-  <root>
-    <priority value ="info" />
-    <appender-ref ref="console" />
-  </root>
-
-</log4j:configuration>
diff --git a/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/test/resources/log4j2-test.xml b/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/test/resources/log4j2-test.xml
new file mode 100644 (file)
index 0000000..d5ab047
--- /dev/null
@@ -0,0 +1,43 @@
+<?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 status="debug">
+  <appenders>
+    <Console name="console" target="SYSTEM_OUT">
+      <PatternLayout pattern="%d [%t] %-5p %c %x - %m%n"/>
+    </Console>
+  </appenders>
+  <loggers>
+
+    <logger name="org.codehaus.redback.rest.services" level="error"/>
+
+    <logger name="JPOX" level="error"/>
+
+
+    <logger name="org.springframework" level="error"/>
+
+    <root level="info">
+      <appender-ref ref="console"/>
+    </root>
+  </loggers>
+</configuration>
+
+
index 8b114b1b7805b344c443b7d92535d1012a1d60b1..ac2288a6984318d402ad815870744873d4aea19c 100644 (file)
       <artifactId>log4j12-api</artifactId>
       <scope>test</scope>
     </dependency>
+    <dependency>
+      <groupId>org.apache.logging.log4j</groupId>
+      <artifactId>slf4j-impl</artifactId>
+      <scope>test</scope>
+    </dependency>
     <dependency>
       <groupId>org.apache.archiva</groupId>
       <artifactId>archiva-test-utils</artifactId>
diff --git a/archiva-modules/archiva-web/archiva-web-common/src/test/resources/log4j.xml b/archiva-modules/archiva-web/archiva-web-common/src/test/resources/log4j.xml
deleted file mode 100644 (file)
index aecb237..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
-<?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.
-  -->
-
-<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
-
-<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/">
-
-  <appender name="console" class="org.apache.log4j.ConsoleAppender">
-    <layout class="org.apache.log4j.PatternLayout">
-      <param name="ConversionPattern" value="%d [%t] %-5p %c %x - %m%n"/>
-    </layout>
-  </appender>
-  <logger name="org.apache.archiva.web">
-    <level value="debug"/>
-  </logger>
-
-
-  <root>
-    <priority value ="info" />
-    <appender-ref ref="console" />
-  </root>
-
-</log4j:configuration>
diff --git a/archiva-modules/archiva-web/archiva-web-common/src/test/resources/log4j2-test.xml b/archiva-modules/archiva-web/archiva-web-common/src/test/resources/log4j2-test.xml
new file mode 100644 (file)
index 0000000..12d50dc
--- /dev/null
@@ -0,0 +1,40 @@
+<?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 status="debug">
+  <appenders>
+    <Console name="console" target="SYSTEM_OUT">
+      <PatternLayout pattern="%d [%t] %-5p %c %x - %m%n"/>
+    </Console>
+  </appenders>
+  <loggers>
+
+    <logger name="org.springframework" level="error"/>
+
+    <logger name="org.apache.archiva.web" level="debug"/>
+
+    <root level="info">
+      <appender-ref ref="console"/>
+    </root>
+  </loggers>
+</configuration>
+
+
index 1e47e168f8e4cea52dfac2861f0a6248eb4ab412..49452e9b5d591f55082f020828f6c6472d810cc1 100644 (file)
       <groupId>org.apache.archiva.redback</groupId>
       <artifactId>redback-integrations-security</artifactId>
     </dependency>
+    <dependency>
+      <groupId>org.slf4j</groupId>
+      <artifactId>jcl-over-slf4j</artifactId>
+      <scope>provided</scope>
+    </dependency>
     <dependency>
       <groupId>commons-logging</groupId>
       <artifactId>commons-logging</artifactId>
diff --git a/archiva-modules/archiva-web/archiva-webapp-js/src/main/resources/log4j.xml b/archiva-modules/archiva-web/archiva-webapp-js/src/main/resources/log4j.xml
deleted file mode 100644 (file)
index 4ab8ea4..0000000
+++ /dev/null
@@ -1,178 +0,0 @@
-<?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.
-  -->
-<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
-
-<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/">
-
-  <appender name="rolling" class="org.apache.log4j.DailyRollingFileAppender">
-    <param name="file" value="${appserver.base}/logs/archiva.log" />
-    <param name="append" value="true" />
-    <param name="datePattern" value="'.'yyyy-MM-dd" />
-    <layout class="org.apache.log4j.PatternLayout">
-      <param name="ConversionPattern" value="%d [%t] %-5p %c %x - %m%n"/>
-    </layout>
-  </appender>
-  
-  <appender name="auditlog" class="org.apache.log4j.DailyRollingFileAppender">
-    <param name="file" value="${appserver.base}/logs/archiva-audit.log" />
-    <param name="append" value="true" />
-    <param name="datePattern" value="'.'yyyy-MM-dd" />
-    <layout class="org.apache.log4j.PatternLayout">
-      <param name="ConversionPattern" value="%d{yyyy-MM-dd HH:mm:ss} %m%n"/>
-    </layout>
-  </appender>
-
-  <appender name="redbackAuditLog" class="org.apache.log4j.DailyRollingFileAppender">
-    <param name="file" value="${appserver.base}/logs/archiva-security-audit.log" />
-    <param name="append" value="true" />
-    <param name="datePattern" value="'.'yyyy-MM-dd" />
-    <layout class="org.apache.log4j.PatternLayout">
-      <param name="ConversionPattern" value="%d{yyyy-MM-dd HH:mm:ss} - %X{redback.currentUser} - %m%n"/>
-    </layout>
-  </appender>
-
-  <logger name="org.apache.archiva.redback.struts2.action.AuditEvent" additivity="false">
-    <level value="info" />
-    <appender-ref ref="redbackAuditLog" />
-  </logger>
-
-  <logger name="org.apache.archiva.AuditLog" additivity="false">
-    <level value="info" />
-    <appender-ref ref="auditlog" />
-  </logger>
-  
-<!-- INFO level loggers can use the default
- <logger name="org.apache.archiva.consumers">
-    <level value="info"/>
-  </logger>
-  
-  <logger name="org.apache.archiva">
-    <level value="info"/>
-  </logger>
-  
-  <logger name="org.codehaus.redback">
-    <level value="info"/>
-  </logger>
-
-  <logger name="org.apache.archiva.redback">
-    <level value="info"/>
-  </logger>
-
-  <logger name="org.codehaus.plexus.mailsender.MailSender">
-    <level value="info"/>
-  </logger>
-
-  <logger name="org.quartz">
-    <level value="info"/>
-  </logger>
-
-  <logger name="org.apache.jasper">
-    <level value="info"/>
-  </logger>
-
-  <logger name="com.opensymphony.xwork2">
-    <level value="info"/>
-  </logger>
-
-  <logger name="org.apache.struts2">
-    <level value="info"/>
-  </logger>
-
-  <logger name="org.codehaus.plexus.PlexusContainer">
-    <level value="info"/>
-  </logger>
--->
-
-  <!-- WebDav objects -->
-  <logger name="org.apache.archiva.webdav.ArchivaDavResource">
-    <level value="info"/>
-  </logger>
-  
-  <logger name="org.apache.archiva.webdav.ArchivaDavResourceFactory">
-    <level value="info"/>
-  </logger>
-
-  <!-- squelch noisy objects (for now) -->
-  <logger name="org.apache.commons">
-    <level value="warn"/>
-  </logger>
-
-  <logger name="net.sf.ehcache">
-    <level value="warn"/>
-  </logger>
-
-  <logger name="org.codehaus.plexus.velocity">
-    <level value="error"/>
-  </logger>
-
-  <!-- retained for Redback -->
-  <logger name="JPOX">
-    <level value="warn"/>
-  </logger>
-
-  <logger name="JPOX.MetaData">
-    <level value="error"/>
-  </logger>
-
-  <logger name="JPOX.RDBMS.SQL">
-    <level value="error"/>
-  </logger>
-
-  <logger name="SQL">
-    <level value="error"/>
-  </logger>
-
-  <logger name="freemarker">
-    <level value="warn"/>
-  </logger>
-
-  <logger name="org.codehaus.plexus.component.manager.ClassicSingletonComponentManager">
-    <level value="error"/>
-  </logger>
-
-  <logger name="com.opensymphony.xwork2.ognl.OgnlValueStack">
-    <level value="error"/>
-  </logger>
-
-  <!-- debug wagon transfer -->
-  <!--
-  <logger name="org.apache.archiva.proxy.common">
-    <level value="debug"/>
-  </logger>
-  -->
-  <!-- apache httpclient debug content transfer verbose -->
-  <!--
-  <logger name="org.apache.http.wire">
-    <level value="debug"/>
-  </logger>
-  -->
-  <!-- apache httpclient log headers -->
-  <!--
-  <logger name="org.apache.http.headers">
-    <level value="debug"/>
-  </logger>
-  -->
-
-  <root>
-    <priority value ="info" />
-    <appender-ref ref="rolling" />
-  </root>
-
-</log4j:configuration>
diff --git a/archiva-modules/archiva-web/archiva-webapp-js/src/main/resources/log4j2.xml b/archiva-modules/archiva-web/archiva-webapp-js/src/main/resources/log4j2.xml
new file mode 100644 (file)
index 0000000..52a145d
--- /dev/null
@@ -0,0 +1,138 @@
+<?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>
+
+  <appenders>
+
+    <RollingFile name="rolling" fileName="${appserver.base}/logs/archiva.log"
+                 filePattern="${appserver.base}/logs/archiva-%d{MM-dd-yy-HH-mm}.log">
+      <PatternLayout>
+        <pattern>%d [%t] %-5p %c %x - %m%n</pattern>
+      </PatternLayout>
+      <Policies>
+        <TimeBasedTriggeringPolicy />
+      </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">
+      <PatternLayout>
+        <pattern>%d{yyyy-MM-dd HH:mm:ss} %m%n</pattern>
+      </PatternLayout>
+      <Policies>
+        <TimeBasedTriggeringPolicy />
+      </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">
+      <PatternLayout>
+        <pattern>%d{yyyy-MM-dd HH:mm:ss} - %X{redback.currentUser} - %m%n</pattern>
+      </PatternLayout>
+      <Policies>
+        <TimeBasedTriggeringPolicy />
+      </Policies>
+    </RollingFile>
+
+  </appenders>
+  <loggers>
+
+    <logger name="org.apache.archiva.redback.struts2.action.AuditEvent" additivity="false" level="info">
+      <appender-ref ref="redbackAuditLog" />
+    </logger>
+
+    <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="freemarker" level="warn"/>
+
+    <logger name="org.codehaus.plexus.component.manager.ClassicSingletonComponentManager" level="error"/>
+
+
+    <logger name="com.opensymphony.xwork2.ognl.OgnlValueStack" 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">
+      <appender-ref ref="rolling"/>
+    </root>
+  </loggers>
+</configuration>
+
+
diff --git a/archiva-modules/archiva-web/archiva-webapp-js/src/test/resources/log4j2-test.xml b/archiva-modules/archiva-web/archiva-webapp-js/src/test/resources/log4j2-test.xml
new file mode 100644 (file)
index 0000000..710a8cd
--- /dev/null
@@ -0,0 +1,53 @@
+<?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 status="debug">
+  <appenders>
+    <Console name="console" target="SYSTEM_OUT">
+      <PatternLayout pattern="%d [%t] %-5p %c %x - %m%n"/>
+    </Console>
+  </appenders>
+  <loggers>
+
+    <!--
+    <logger name="org.apache.cxf.jaxrs.interceptor.JAXRSInInterceptor">
+      <level value="trace"/>
+    </logger>
+    <logger name="org.apache.cxf.jaxrs.utils.JAXRSUtils">
+      <level value="trace"/>
+    </logger>
+    -->
+
+
+    <logger name="org.apache.archiva.redback.rest.services" level="error"/>
+
+    <logger name="JPOX" level="error"/>
+
+
+    <logger name="org.springframework" level="error"/>
+
+    <root level="info">
+      <appender-ref ref="console"/>
+    </root>
+  </loggers>
+</configuration>
+
+
index e255b5fccaa729259a1164790bf845fb47110e14..6b2a8b8aa4fc3ff72191c284dd8d6c784105b469 100644 (file)
         </exclusion>
       </exclusions>
     </dependency>
+    <dependency>
+      <groupId>org.slf4j</groupId>
+      <artifactId>slf4j-ext</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.slf4j</groupId>
+      <artifactId>jcl-over-slf4j</artifactId>
+      <scope>provided</scope>
+    </dependency>
     <dependency>
       <groupId>org.apache.logging.log4j</groupId>
       <artifactId>log4j12-api</artifactId>
       <scope>runtime</scope>
     </dependency>
+    <dependency>
+      <groupId>org.apache.logging.log4j</groupId>
+      <artifactId>log4j-core</artifactId>
+      <scope>runtime</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.logging.log4j</groupId>
+      <artifactId>slf4j-impl</artifactId>
+      <scope>runtime</scope>
+    </dependency>
     <dependency>
       <groupId>httpunit</groupId>
       <artifactId>httpunit</artifactId>
     <dependency>
       <groupId>org.apache.archiva.redback</groupId>
       <artifactId>redback-struts2-integration</artifactId>
+      <exclusions>
+        <exclusion>
+          <groupId>org.slf4j</groupId>
+          <artifactId>jcl-over-slf4j</artifactId>
+        </exclusion>
+      </exclusions>
     </dependency>
     <dependency>
       <groupId>org.apache.archiva.redback</groupId>
       <id>dev</id>
       <build>
         <plugins>
-          <plugin>
-            <groupId>org.apache.maven.plugins</groupId>
-            <artifactId>maven-antrun-plugin</artifactId>
-            <executions>
-              <execution>
-                <id>override-log4j-with-console-output</id>
-                <phase>process-resources</phase>
-                <goals>
-                  <goal>run</goal>
-                </goals>
-                <configuration>
-                  <tasks>
-                    <copy overwrite="true" file="${basedir}/src/test/tomcat/log4j.xml"
-                          todir="${project.build.directory}/classes"/>
-                    <copy overwrite="true" file="${basedir}/src/test/tomcat/auto-admin-creation.properties"
-                          todir="${basedir}/target/"/>
-                    <delete dir="${basedir}/src/main/webapp/WEB-INF/lib"/>
-                  </tasks>
-                </configuration>
-              </execution>
-            </executions>
-          </plugin>
           <plugin>
             <groupId>org.apache.maven.plugins</groupId>
             <artifactId>maven-dependency-plugin</artifactId>
                 <appserver.base>${archivaAppServerBase}</appserver.base>
                 <appserver.home>${archivaAppServerBase}</appserver.home>
                 <derby.system.home>${archivaAppServerBase}/logs</derby.system.home>
-                <redback.admin.creation.file>${basedir}/target/auto-admin-creation.properties
-                </redback.admin.creation.file>
+                <redback.admin.creation.file>${basedir}/src/test/tomcat/auto-admin-creation.properties </redback.admin.creation.file>
                 <java.io.tmpdir>${project.build.directory}</java.io.tmpdir>
               </systemProperties>
+              <additionalClasspathDirs>
+                <additionalClasspathDir>${basedir}/src/test/tomcat</additionalClasspathDir>
+              </additionalClasspathDirs>
             </configuration>
             <dependencies>
               <dependency>
                 <appserver.base>${archivaAppServerBase}</appserver.base>
                 <appserver.home>${archivaAppServerBase}</appserver.home>
                 <derby.system.home>${archivaAppServerBase}/logs</derby.system.home>
-                <redback.admin.creation.file>${basedir}/target/auto-admin-creation.properties
-                </redback.admin.creation.file>
+                <redback.admin.creation.file>${basedir}/src/test/tomcat/auto-admin-creation.properties </redback.admin.creation.file>
                 <java.io.tmpdir>${project.build.directory}</java.io.tmpdir>
               </systemProperties>
+              <additionalClasspathDirs>
+                <additionalClasspathDir>${basedir}/src/test/tomcat</additionalClasspathDir>
+              </additionalClasspathDirs>
             </configuration>
             <dependencies>
               <dependency>
diff --git a/archiva-modules/archiva-web/archiva-webapp/src/main/resources/log4j2.xml b/archiva-modules/archiva-web/archiva-webapp/src/main/resources/log4j2.xml
new file mode 100644 (file)
index 0000000..16e84a5
--- /dev/null
@@ -0,0 +1,138 @@
+<?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 status="debug">
+
+  <appenders>
+
+    <RollingFile name="rolling" fileName="${appserver.base}/logs/archiva.log"
+                 filePattern="${appserver.base}/logs/archiva-%d{MM-dd-yy-HH-mm}.log">
+      <PatternLayout>
+        <pattern>%d [%t] %-5p %c %x - %m%n</pattern>
+      </PatternLayout>
+      <Policies>
+        <TimeBasedTriggeringPolicy />
+      </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">
+      <PatternLayout>
+        <pattern>%d{yyyy-MM-dd HH:mm:ss} %m%n</pattern>
+      </PatternLayout>
+      <Policies>
+        <TimeBasedTriggeringPolicy />
+      </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">
+      <PatternLayout>
+        <pattern>%d{yyyy-MM-dd HH:mm:ss} - %X{redback.currentUser} - %m%n</pattern>
+      </PatternLayout>
+      <Policies>
+        <TimeBasedTriggeringPolicy />
+      </Policies>
+    </RollingFile>
+
+  </appenders>
+  <loggers>
+
+    <logger name="org.apache.archiva.redback.struts2.action.AuditEvent" additivity="false" level="info">
+      <appender-ref ref="redbackAuditLog" />
+    </logger>
+
+    <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="freemarker" level="warn"/>
+
+    <logger name="org.codehaus.plexus.component.manager.ClassicSingletonComponentManager" level="error"/>
+
+
+    <logger name="com.opensymphony.xwork2.ognl.OgnlValueStack" 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">
+      <appender-ref ref="rolling"/>
+    </root>
+  </loggers>
+</configuration>
+
+
diff --git a/archiva-modules/archiva-web/archiva-webapp/src/test/resources/log4j.xml b/archiva-modules/archiva-web/archiva-webapp/src/test/resources/log4j.xml
deleted file mode 100644 (file)
index 8f948fb..0000000
+++ /dev/null
@@ -1,100 +0,0 @@
-<?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.
-  -->
-
-<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
-
-<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/">
-
-  <appender name="console" class="org.apache.log4j.ConsoleAppender">
-    <layout class="org.apache.log4j.PatternLayout">
-      <param name="ConversionPattern" value="%d [%t] %-5p %c %x - %m%n"/>
-    </layout>
-  </appender>
-  <logger name="org.apache.archiva.web.action.SearchAction">
-    <level value="debug"/>
-  </logger>
-  <logger name="org.apache.archiva.indexer.search.NexusRepositorySearch">
-    <level value="debug"/>
-  </logger>
-  <logger name="org.apache.archiva.common.plexusbridge.MavenIndexerUtils">
-    <level value="debug"/>
-  </logger>
-  <logger name="JPOX">
-    <level value="error"/>
-  </logger>
-  <!-- debug wagon transfer -->
-  <logger name="org.apache.archiva.proxy.common">
-    <level value="debug"/>
-  </logger>
-  <!-- apache httpclient debug content transfer-->
-  <!--
-  <logger name="org.apache.http.wire">
-    <level value="debug"/>
-  </logger>
-  -->
-  <logger name="org.apache.http.headers">
-    <level value="debug"/>
-  </logger>
-
-
-  <logger name="org.apache.commons.configuration.DefaultConfigurationBuilder">
-    <level value="error"/>
-  </logger>
-
-  <logger name="org.apache.archiva.web.action.UploadAction">
-    <level value="debug"/>
-  </logger>
-
-  <logger name="org.apache.archiva.admin.repository.managed">
-    <level value="debug"/>
-  </logger>
-
-  <logger name="com.opensymphony.xwork2.ognl.OgnlValueStack">
-    <level value="error"/>
-  </logger>
-
-  <!-- reduce noise for unit tests -->
-
-  <logger name="org.springframework">
-    <level value="error"/>
-  </logger>
-
-  <logger name="org.codehaus.plexus">
-    <level value="error"/>
-  </logger>
-
-  <logger name="org.codehaus.redback">
-    <level value="error"/>
-  </logger>
-
-  <logger name="org.apache.cxf">
-    <level value="error"/>
-  </logger>
-
-  <logger name="org.quartz">
-    <level value="error"/>
-  </logger>
-
-  <root>
-    <priority value ="info" />
-    <appender-ref ref="console" />
-  </root>
-
-</log4j:configuration>
diff --git a/archiva-modules/archiva-web/archiva-webapp/src/test/resources/log4j2-test.xml b/archiva-modules/archiva-web/archiva-webapp/src/test/resources/log4j2-test.xml
new file mode 100644 (file)
index 0000000..8d23a38
--- /dev/null
@@ -0,0 +1,78 @@
+<?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 status="debug">
+  <appenders>
+    <Console name="console" target="SYSTEM_OUT">
+      <PatternLayout pattern="%d [%t] %-5p %c %x - %m%n"/>
+    </Console>
+  </appenders>
+  <loggers>
+
+    <logger name="org.apache.archiva.web.action.SearchAction" level="debug"/>
+
+    <logger name="org.apache.archiva.indexer.search.NexusRepositorySearch" level="debug"/>
+
+    <logger name="org.apache.archiva.common.plexusbridge.MavenIndexerUtils" level="debug"/>
+
+    <logger name="JPOX" level="error"/>
+
+    <!-- debug wagon transfer -->
+    <logger name="org.apache.archiva.proxy.common" level="debug"/>
+
+    <!-- apache httpclient debug content transfer-->
+    <!--
+    <logger name="org.apache.http.wire" level="debug"/>
+
+    -->
+    <logger name="org.apache.http.headers" level="debug"/>
+
+    <logger name="org.apache.commons.configuration.DefaultConfigurationBuilder" level="error"/>
+
+
+    <logger name="org.apache.archiva.web.action.UploadAction" level="debug"/>
+
+
+    <logger name="org.apache.archiva.admin.repository.managed" level="debug"/>
+
+
+    <logger name="com.opensymphony.xwork2.ognl.OgnlValueStack" level="error"/>
+
+
+    <!-- reduce noise for unit tests -->
+
+    <logger name="org.springframework" level="error"/>
+
+    <logger name="org.codehaus.plexus" level="error"/>
+
+    <logger name="org.apache.archiva.redback" level="error"/>
+
+    <logger name="org.apache.cxf" level="error"/>
+
+    <logger name="org.quartz" level="error"/>
+
+    <root level="info">
+      <appender-ref ref="console"/>
+    </root>
+  </loggers>
+</configuration>
+
+
diff --git a/archiva-modules/archiva-web/archiva-webapp/src/test/tomcat/log4j.xml b/archiva-modules/archiva-web/archiva-webapp/src/test/tomcat/log4j.xml
deleted file mode 100644 (file)
index 11476e0..0000000
+++ /dev/null
@@ -1,85 +0,0 @@
-<?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.
-  -->
-
-<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
-
-<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/">
-
-  <appender name="console" class="org.apache.log4j.ConsoleAppender">
-    <layout class="org.apache.log4j.PatternLayout">
-      <param name="ConversionPattern" value="%d [%t] %-5p %c %x - %m%n"/>
-    </layout>
-  </appender>
-  <logger name="org.apache.archiva.web.action.SearchAction">
-    <level value="debug"/>
-  </logger>
-  <logger name="org.apache.archiva.indexer.search.NexusRepositorySearch">
-    <level value="debug"/>
-  </logger>
-  <logger name="org.apache.archiva.common.plexusbridge.MavenIndexerUtils">
-    <level value="debug"/>
-  </logger>
-  <logger name="JPOX">
-    <level value="error"/>
-  </logger>
-
-  <logger name="org.apache.commons.configuration.DefaultConfigurationBuilder">
-    <level value="error"/>
-  </logger>
-
-  <logger name="org.apache.archiva.admin.repository.managed">
-    <level value="debug"/>
-  </logger>
-
-  <logger name="com.opensymphony.xwork2.ognl.OgnlValueStack">
-    <level value="error"/>
-  </logger>
-
-
-  <logger name="org.springframework">
-    <level value="info"/>
-  </logger>
-
-  <logger name="org.codehaus.plexus">
-    <level value="info"/>
-  </logger>
-
-  <logger name="org.codehaus.redback">
-    <level value="info"/>
-  </logger>
-
-  <logger name="org.apache.cxf">
-    <level value="info"/>
-  </logger>
-
-  <logger name="org.quartz">
-    <level value="info"/>
-  </logger>
-
-  <logger name="org.apache.archiva.indexer.merger">
-    <level value="debug"/>
-  </logger>
-
-  <root>
-    <priority value ="info" />
-    <appender-ref ref="console" />
-  </root>
-
-</log4j:configuration>
diff --git a/archiva-modules/archiva-web/archiva-webapp/src/test/tomcat/log4j2-test.xml b/archiva-modules/archiva-web/archiva-webapp/src/test/tomcat/log4j2-test.xml
new file mode 100644 (file)
index 0000000..8c01d10
--- /dev/null
@@ -0,0 +1,64 @@
+<?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 status="debug">
+  <appenders>
+    <Console name="console" target="SYSTEM_OUT">
+      <PatternLayout pattern="%d [%t] %-5p %c %x - %m%n"/>
+    </Console>
+  </appenders>
+  <loggers>
+
+    <logger name="org.apache.archiva.web.action.SearchAction" level="debug"/>
+
+    <logger name="org.apache.archiva.indexer.search.NexusRepositorySearch" level="debug"/>
+
+    <logger name="org.apache.archiva.common.plexusbridge.MavenIndexerUtils" level="debug"/>
+
+    <logger name="JPOX" level="error"/>
+
+    <logger name="org.apache.commons.configuration.DefaultConfigurationBuilder" level="error"/>
+
+    <logger name="org.apache.archiva.admin.repository.managed" level="debug"/>
+
+    <logger name="com.opensymphony.xwork2.ognl.OgnlValueStack" level="error"/>
+
+
+    <logger name="org.springframework" level="info"/>
+
+
+    <logger name="org.codehaus.plexus" level="info"/>
+
+    <logger name="org.apache.archiva.redback" level="info"/>
+
+    <logger name="org.apache.cxf" level="info"/>
+
+    <logger name="org.quartz" level="info"/>
+
+    <logger name="org.apache.archiva.indexer.merger" level="debug"/>
+
+    <root level="info">
+      <appender-ref ref="console"/>
+    </root>
+  </loggers>
+</configuration>
+
+
index 2747ef8775ef9552ce79a768febf8db3e33fbedf..645e20f57212e9800fd576cd8e3de3741f232a70 100644 (file)
       <scope>test</scope>
     </dependency>
 
+    <dependency>
+      <groupId>org.apache.logging.log4j</groupId>
+      <artifactId>log4j12-api</artifactId>
+    </dependency>
+
   </dependencies>
   <build>
     <plugins>
index ac07043de5dcd93618cd0a6f844f8112f62b8228..383dcf3308fcfcc7e5c64778fb2524e7495296a1 100644 (file)
       <scope>provided</scope>
       <!-- could trim more, but since it's just for test we don't need to worry -->
       <exclusions>
-        <exclusion>
-          <groupId>commons-logging</groupId>
-          <artifactId>commons-logging</artifactId>
-        </exclusion>
         <exclusion>
           <groupId>org.slf4j</groupId>
           <artifactId>jcl-over-slf4j</artifactId>
         </exclusion>
       </exclusions>
     </dependency>
+    <dependency>
+      <groupId>org.apache.logging.log4j</groupId>
+      <artifactId>log4j-jcl</artifactId>
+    </dependency>
     <dependency>
       <groupId>org.springframework</groupId>
       <artifactId>spring-test</artifactId>
index 8a8adb65f8fefdf974201d4bddc6371e0c60a0ed..ac0f2eb7331f0dedc218ad8599a1908ed1f87d22 100644 (file)
       <artifactId>log4j12-api</artifactId>
       <scope>test</scope>
     </dependency>
+    <dependency>
+      <groupId>org.apache.logging.log4j</groupId>
+      <artifactId>slf4j-impl</artifactId>
+      <scope>test</scope>
+    </dependency>
     <dependency>
       <groupId>org.apache.maven.wagon</groupId>
       <artifactId>wagon-http</artifactId>
diff --git a/archiva-modules/plugins/stage-repository-merge/src/test/resources/log4j.xml b/archiva-modules/plugins/stage-repository-merge/src/test/resources/log4j.xml
deleted file mode 100644 (file)
index c07e3a4..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-<?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.
-  -->
-
-<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
-
-<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/">
-
-  <appender name="console" class="org.apache.log4j.ConsoleAppender">
-    <layout class="org.apache.log4j.PatternLayout">
-      <param name="ConversionPattern" value="%d [%t] %-5p %c %x - %m%n"/>
-    </layout>
-  </appender>
-
-
-  <logger name="org.apache.archiva.stagerepository.merge">
-    <level value="debug"/>
-  </logger>
-
-  <root>
-    <priority value ="info" />
-    <appender-ref ref="console" />
-  </root>
-
-</log4j:configuration>
diff --git a/archiva-modules/plugins/stage-repository-merge/src/test/resources/log4j2-test.xml b/archiva-modules/plugins/stage-repository-merge/src/test/resources/log4j2-test.xml
new file mode 100644 (file)
index 0000000..1ce090b
--- /dev/null
@@ -0,0 +1,41 @@
+<?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 status="debug">
+  <appenders>
+    <Console name="console" target="SYSTEM_OUT">
+      <PatternLayout pattern="%d{HH:mm:ss.SSS} [%t] %-5level %logger{36} - %msg%n"/>
+    </Console>
+  </appenders>
+  <loggers>
+
+    <logger name="org.apache.archiva.stagerepository.merge" level="debug"/>
+
+    <logger name="org.springframework" level="error"/>
+
+
+    <root level="info">
+      <appender-ref ref="console"/>
+    </root>
+  </loggers>
+</configuration>
+
+
diff --git a/pom.xml b/pom.xml
index 8db3d59863567a3a6716c4b1ac6a72d637c42580..8e4b83905210286a28adb0f69e56436a210e7871 100644 (file)
--- a/pom.xml
+++ b/pom.xml
         <artifactId>slf4j-api</artifactId>
         <version>${slf4j.version}</version>
       </dependency>
+      <dependency>
+        <groupId>org.slf4j</groupId>
+        <artifactId>jcl-over-slf4j</artifactId>
+        <version>${slf4j.version}</version>
+      </dependency>
+      <dependency>
+        <groupId>org.slf4j</groupId>
+        <artifactId>slf4j-ext</artifactId>
+        <version>${slf4j.version}</version>
+      </dependency>
       <dependency>
         <groupId>org.slf4j</groupId>
         <artifactId>slf4j-jdk14</artifactId>
 
                     <exclude>commons-logging:commons-logging-api</exclude>
                     <exclude>log4j:log4j</exclude>
+                    <!--
                     <exclude>org.slf4j:jcl-over-slf4j</exclude>
                     <exclude>org.slf4j:slf4j-log4j12</exclude>
-
+                    -->
                     <!-- TODO org.sonatype.sisu:sisu-guava -->
 
                   </excludes>