You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by ro...@apache.org on 2021/12/15 16:57:24 UTC

[sling-org-apache-sling-commons-metrics-rrd4j] 01/01: SLING-11008 - commons.metrics.rrd4j - switch to slf4j-simple for test logs

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

rombert pushed a commit to branch issue/SLING-11008
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-commons-metrics-rrd4j.git

commit 158e0a7e639390dbdae1147e6ef45c61cf33f5ff
Author: Robert Munteanu <ro...@apache.org>
AuthorDate: Wed Dec 15 17:56:33 2021 +0100

    SLING-11008 - commons.metrics.rrd4j - switch to slf4j-simple for test logs
    
    For tests we don't often need a complex logging implementation. Logging to stdout
    and controlling a couple of parameters are supported for slf4j and we should use
    that if at all possible. Being managed as part of the parent pom is also an advantage.
---
 pom.xml                             | 11 ++++-------
 src/test/resources/logback-test.xml | 30 ------------------------------
 2 files changed, 4 insertions(+), 37 deletions(-)

diff --git a/pom.xml b/pom.xml
index be80cf9..3f407bd 100644
--- a/pom.xml
+++ b/pom.xml
@@ -70,18 +70,15 @@
             <version>1.0.0</version>
             <scope>provided</scope>
         </dependency>
-        <!-- test dependencies -->
-        <dependency>
-            <groupId>ch.qos.logback</groupId>
-            <artifactId>logback-classic</artifactId>
-            <version>1.1.7</version>
-            <scope>test</scope>
-        </dependency>
         <dependency>
             <groupId>junit</groupId>
             <artifactId>junit</artifactId>
         </dependency>
         <dependency>
+            <groupId>org.slf4j</groupId>
+            <artifactId>slf4j-simple</artifactId>
+        </dependency>
+        <dependency>
             <groupId>org.apache.sling</groupId>
             <artifactId>org.apache.sling.testing.osgi-mock</artifactId>
             <version>2.3.2</version>
diff --git a/src/test/resources/logback-test.xml b/src/test/resources/logback-test.xml
deleted file mode 100644
index bcb98cc..0000000
--- a/src/test/resources/logback-test.xml
+++ /dev/null
@@ -1,30 +0,0 @@
-<!--
-   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>
-
-    <appender name="file" class="ch.qos.logback.core.FileAppender">
-        <file>target/unit-tests.log</file>
-        <encoder>
-            <pattern>%date{HH:mm:ss.SSS} %-5level %-40([%thread] %F:%L) %msg%n</pattern>
-        </encoder>
-    </appender>
-
-    <root level="INFO">
-        <appender-ref ref="file"/>
-    </root>
-
-</configuration>