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

elharo pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/maven.git


The following commit(s) were added to refs/heads/master by this push:
     new 2d85d13ee MNG-7724 don't warn about unsupported SLF4J configs; no one 
cares (#1051)
2d85d13ee is described below

commit 2d85d13ee8469cb81f819a62371b86df8e5af11e
Author: Elliotte Rusty Harold <[email protected]>
AuthorDate: Sat Mar 11 14:13:02 2023 -0500

    MNG-7724 don't warn about unsupported SLF4J configs; no one cares (#1051)
---
 .../cli/logging/Slf4jConfigurationFactory.java     |  2 +-
 .../impl/UnsupportedSlf4jBindingConfiguration.java | 36 +++++-----------------
 2 files changed, 9 insertions(+), 29 deletions(-)

diff --git 
a/maven-embedder/src/main/java/org/apache/maven/cli/logging/Slf4jConfigurationFactory.java
 
b/maven-embedder/src/main/java/org/apache/maven/cli/logging/Slf4jConfigurationFactory.java
index 8f5d7688a..92fa07d19 100644
--- 
a/maven-embedder/src/main/java/org/apache/maven/cli/logging/Slf4jConfigurationFactory.java
+++ 
b/maven-embedder/src/main/java/org/apache/maven/cli/logging/Slf4jConfigurationFactory.java
@@ -67,6 +67,6 @@ public class Slf4jConfigurationFactory {
             e.printStackTrace();
         }
 
-        return new UnsupportedSlf4jBindingConfiguration(slf4jBinding, 
supported);
+        return new UnsupportedSlf4jBindingConfiguration();
     }
 }
diff --git 
a/maven-embedder/src/main/java/org/apache/maven/cli/logging/impl/UnsupportedSlf4jBindingConfiguration.java
 
b/maven-embedder/src/main/java/org/apache/maven/cli/logging/impl/UnsupportedSlf4jBindingConfiguration.java
index 837997dfb..7f76a06d1 100644
--- 
a/maven-embedder/src/main/java/org/apache/maven/cli/logging/impl/UnsupportedSlf4jBindingConfiguration.java
+++ 
b/maven-embedder/src/main/java/org/apache/maven/cli/logging/impl/UnsupportedSlf4jBindingConfiguration.java
@@ -23,43 +23,23 @@ import java.util.Map;
 import java.util.Set;
 
 import org.apache.maven.cli.logging.BaseSlf4jConfiguration;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 
 /**
- * Pseudo-configuration for unsupported slf4j binding.
+ * Pseudo-configuration for unsupported SLF4J binding.
  *
  * @author Hervé Boutemy
  * @since 3.2.4
  */
 public class UnsupportedSlf4jBindingConfiguration extends 
BaseSlf4jConfiguration {
-    private static final Logger LOGGER = 
LoggerFactory.getLogger(UnsupportedSlf4jBindingConfiguration.class);
 
-    private String slf4jBinding;
+    /**
+     * @deprecated the arguments are ignored. Use the no-args constructor.
+     */
+    @Deprecated
+    public UnsupportedSlf4jBindingConfiguration(String slf4jBinding, Map<URL, 
Set<Object>> supported) {}
 
-    private Map<URL, Set<Object>> supported;
-
-    public UnsupportedSlf4jBindingConfiguration(String slf4jBinding, Map<URL, 
Set<Object>> supported) {
-        this.slf4jBinding = slf4jBinding;
-        this.supported = supported;
-    }
+    public UnsupportedSlf4jBindingConfiguration() {}
 
     @Override
-    public void activate() {
-        LOGGER.warn("The SLF4J binding actually used is not supported by 
Maven: {}", slf4jBinding);
-        LOGGER.warn("Maven supported bindings are:");
-
-        String ls = System.lineSeparator();
-
-        for (Map.Entry<URL, Set<Object>> entry : supported.entrySet()) {
-            StringBuilder sb = new StringBuilder();
-            sb.append("(from 
").append(entry.getKey().toExternalForm()).append(')');
-
-            for (Object binding : entry.getValue()) {
-                sb.append(ls).append("- ").append(binding);
-            }
-
-            LOGGER.warn(sb.toString());
-        }
-    }
+    public void activate() {}
 }

Reply via email to