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

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


The following commit(s) were added to refs/heads/master by this push:
     new 3b10083  Fix mvn/bin/mvn debug output (#606)
3b10083 is described below

commit 3b100839a810ce9ae2555c1592b5edb623223924
Author: Guillaume Nodet <gno...@gmail.com>
AuthorDate: Sat Mar 5 09:03:14 2022 +0100

    Fix mvn/bin/mvn debug output (#606)
---
 .../mvnd/logging/internal/MvndSlf4jConfiguration.java   | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git 
a/daemon/src/main/java/org/mvndaemon/mvnd/logging/internal/MvndSlf4jConfiguration.java
 
b/daemon/src/main/java/org/mvndaemon/mvnd/logging/internal/MvndSlf4jConfiguration.java
index deddf48..0e48b4c 100644
--- 
a/daemon/src/main/java/org/mvndaemon/mvnd/logging/internal/MvndSlf4jConfiguration.java
+++ 
b/daemon/src/main/java/org/mvndaemon/mvnd/logging/internal/MvndSlf4jConfiguration.java
@@ -16,10 +16,27 @@
 package org.mvndaemon.mvnd.logging.internal;
 
 import org.apache.maven.cli.logging.Slf4jConfiguration;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 public class MvndSlf4jConfiguration implements Slf4jConfiguration {
     @Override
     public void setRootLoggerLevel(Level level) {
+        ch.qos.logback.classic.Level value;
+        switch (level) {
+        case DEBUG:
+            value = ch.qos.logback.classic.Level.DEBUG;
+            break;
+
+        case INFO:
+            value = ch.qos.logback.classic.Level.INFO;
+            break;
+
+        default:
+            value = ch.qos.logback.classic.Level.ERROR;
+            break;
+        }
+        ((ch.qos.logback.classic.Logger) 
LoggerFactory.getLogger(Logger.ROOT_LOGGER_NAME)).setLevel(value);
     }
 
     @Override

Reply via email to