You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by bd...@apache.org on 2020/03/13 14:37:28 UTC

[sling-org-apache-sling-jcr-repoinit] 02/02: Quieter tests, log to target file

This is an automated email from the ASF dual-hosted git repository.

bdelacretaz pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-jcr-repoinit.git

commit b53c3dad096963ddfcd7a440a4b9c159eda0ace4
Author: Bertrand Delacretaz <bd...@apache.org>
AuthorDate: Fri Mar 13 15:36:48 2020 +0100

    Quieter tests, log to target file
---
 pom.xml                             | 13 ++++++++++++-
 src/test/resources/log4j.properties | 24 ++++++++++++++++++++++++
 2 files changed, 36 insertions(+), 1 deletion(-)

diff --git a/pom.xml b/pom.xml
index 68738c4..172b2a8 100644
--- a/pom.xml
+++ b/pom.xml
@@ -185,7 +185,8 @@
         </dependency>
         <dependency>
             <groupId>org.slf4j</groupId>
-          <artifactId>slf4j-simple</artifactId>
+            <artifactId>slf4j-log4j12</artifactId>
+            <version>1.7.30</version>
             <scope>test</scope>
         </dependency>
         <dependency>
@@ -269,6 +270,16 @@
             <artifactId>org.apache.sling.commons.testing</artifactId>
             <version>2.1.2</version>
             <scope>test</scope>
+            <exclusions>
+                <exclusion>
+                    <groupId>org.slf4j</groupId>
+                    <artifactId>slf4j-simple</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>org.slf4j</groupId>
+                    <artifactId>jcl-over-slf4j</artifactId>
+                </exclusion>
+            </exclusions>
         </dependency>
         <dependency>
             <groupId>org.apache.sling</groupId>
diff --git a/src/test/resources/log4j.properties b/src/test/resources/log4j.properties
new file mode 100644
index 0000000..3060198
--- /dev/null
+++ b/src/test/resources/log4j.properties
@@ -0,0 +1,24 @@
+# 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.
+
+log4j.rootLogger=INFO, file
+log4j.appender.file=org.apache.log4j.FileAppender
+log4j.appender.file.File=target/testing.log
+log4j.appender.file.layout=org.apache.log4j.PatternLayout
+log4j.appender.file.layout.ConversionPattern=%d{dd.MM.yyyy HH:mm:ss} *%-5p* [%t] %c{1}: %m (%F, line %L)\n
+
+log4j.logger.org.apache.jackrabbit=WARN
\ No newline at end of file