You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by ah...@apache.org on 2012/12/01 15:50:03 UTC
[34/50] git commit: added info about direct SLF4J use
added info about direct SLF4J use
git-svn-id: https://svn.apache.org/repos/asf/maven/maven-3/trunk@1412765 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/35fe39c6
Tree: http://git-wip-us.apache.org/repos/asf/maven/tree/35fe39c6
Diff: http://git-wip-us.apache.org/repos/asf/maven/diff/35fe39c6
Branch: refs/heads/feature/colorized-console/log4j2
Commit: 35fe39c6755ad791423054c94b9a7fd2b820a063
Parents: 55ebcde
Author: Herve Boutemy <hb...@apache.org>
Authored: Fri Nov 23 07:17:37 2012 +0000
Committer: Arnaud HeĢritier <ah...@exoplatform.com>
Committed: Sat Dec 1 13:51:02 2012 +0100
----------------------------------------------------------------------
maven-embedder/src/site/apt/logging.apt | 13 +++++++++++++
1 files changed, 13 insertions(+), 0 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/maven/blob/35fe39c6/maven-embedder/src/site/apt/logging.apt
----------------------------------------------------------------------
diff --git a/maven-embedder/src/site/apt/logging.apt b/maven-embedder/src/site/apt/logging.apt
index e2830c4..2caf177 100644
--- a/maven-embedder/src/site/apt/logging.apt
+++ b/maven-embedder/src/site/apt/logging.apt
@@ -37,3 +37,16 @@ public class DefaultMyComponent
private Logger logger;
}
+------
+
+ Starting with Maven 3.1.0, SLF4J Logger can be used directly too, without Plexus. Of course, this will only work when run under
+ Maven 3.1.0, then this technique can be used safely only in Maven core components.
+
++-----
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class Wombat
+{
+ final Logger logger = LoggerFactory.getLogger(Wombat.class);
+}
++-----