maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jvan...@apache.org
Subject [14/50] git commit: avoid logger with name ended with .null if no hint
Date Mon, 18 Mar 2013 21:47:28 GMT
avoid logger with name ended with .null if no hint

git-svn-id: https://svn.apache.org/repos/asf/maven/maven-3/trunk@1409719 13f79535-47bb-0310-9956-ffa450edef68


Project: http://git-wip-us.apache.org/repos/asf/maven/repo
Commit: http://git-wip-us.apache.org/repos/asf/maven/commit/7200f2d0
Tree: http://git-wip-us.apache.org/repos/asf/maven/tree/7200f2d0
Diff: http://git-wip-us.apache.org/repos/asf/maven/diff/7200f2d0

Branch: refs/heads/master
Commit: 7200f2d038a0c57a62ee19c02ffdb36e5c2f26e9
Parents: bd14313
Author: Olivier Lamy <olamy@apache.org>
Authored: Thu Nov 15 10:18:21 2012 +0000
Committer: Olivier Lamy <olamy@apache.org>
Committed: Thu Nov 15 10:18:21 2012 +0000

----------------------------------------------------------------------
 .../maven/cli/logging/Slf4jLoggerManager.java      |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/maven/blob/7200f2d0/maven-embedder/src/main/java/org/apache/maven/cli/logging/Slf4jLoggerManager.java
----------------------------------------------------------------------
diff --git a/maven-embedder/src/main/java/org/apache/maven/cli/logging/Slf4jLoggerManager.java
b/maven-embedder/src/main/java/org/apache/maven/cli/logging/Slf4jLoggerManager.java
index 9fd83d1..140eccf 100644
--- a/maven-embedder/src/main/java/org/apache/maven/cli/logging/Slf4jLoggerManager.java
+++ b/maven-embedder/src/main/java/org/apache/maven/cli/logging/Slf4jLoggerManager.java
@@ -29,7 +29,9 @@ public class Slf4jLoggerManager
 
     public Logger getLoggerForComponent( String role, String hint )
     {
-        return new Slf4jLogger( loggerFactory.getLogger( role + "." + hint ) );
+        return ( null == hint
+            ? getLoggerForComponent( role )
+            : new Slf4jLogger( loggerFactory.getLogger( role + "." + hint ) ) );
     }
 
     //


Mime
View raw message