You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by hb...@apache.org on 2013/08/02 01:28:53 UTC

[1/2] git commit: improved logging documentation

Updated Branches:
  refs/heads/master 0dde56162 -> ea97145df


improved logging documentation

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

Branch: refs/heads/master
Commit: aaa198abfb518896c49a98b6b280b60d83dc6e8b
Parents: 0dde561
Author: Hervé Boutemy <hb...@apache.org>
Authored: Fri Aug 2 01:27:07 2013 +0200
Committer: Hervé Boutemy <hb...@apache.org>
Committed: Fri Aug 2 01:27:07 2013 +0200

----------------------------------------------------------------------
 maven-embedder/src/site/apt/logging.apt | 32 ++++++++++++++++++++++------
 1 file changed, 25 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/maven/blob/aaa198ab/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 1f1c4ed..0e84041 100644
--- a/maven-embedder/src/site/apt/logging.apt
+++ b/maven-embedder/src/site/apt/logging.apt
@@ -20,22 +20,39 @@
  -----
  Hervé Boutemy
  -----
- 2012-04-29
+ 2013-08-02
  -----
 
 Maven Logging
 
+ End-user logging documentation is available {{{/maven-logging.html}in Maven site}}.
+ This documentation is focused on internal implementation details.
+
+* Logging API
+
  Maven uses
  {{{http://plexus.codehaus.org/plexus-containers/plexus-container-default/apidocs/org/codehaus/plexus/logging/package-summary.html}Plexus
  Container logging API}}, like any other Plexus components, ie 
  {{{http://plexus.codehaus.org/plexus-containers/plexus-container-default/apidocs/org/codehaus/plexus/logging/LoggerManager.html}LoggerManager}}
  / {{{http://plexus.codehaus.org/plexus-containers/plexus-container-default/apidocs/org/codehaus/plexus/logging/Logger.html}Logger}}.
 
- Starting with Maven 3.1.0, instead of implementing the API itself,
- Maven maps to {{{http://slf4j.org/apidocs/}SLF4J API}}'s {{{http://slf4j.org/apidocs/org/slf4j/ILoggerFactory.html}ILoggerFactory}}
- / {{{http://slf4j.org/apidocs/org/slf4j/Logger.html}Logger}} through
- {{{./apidocs/org/apache/maven/cli/logging/Slf4jLoggerManager.html}Slf4jLoggerManager}}
- / {{{./apidocs/org/apache/maven/cli/logging/Slf4jLogger.html}Slf4jLogger}}.
+ Starting with Maven 3.1.0:
+ 
+  *  Maven supports SLF4J API logging API too, ie {{{http://slf4j.org/apidocs/org/slf4j/LoggerFactory.html}LoggerFactory}} /
+     {{{http://slf4j.org/apidocs/org/slf4j/Logger.html}Logger}},
+
+  *  instead of implementing Plexus logging API itself with basic output to console, Maven implements it using SLF4J API in
+     {{{./apidocs/org/apache/maven/cli/logging/Slf4jLoggerManager.html}Slf4jLoggerManager}}
+     / {{{./apidocs/org/apache/maven/cli/logging/Slf4jLogger.html}Slf4jLogger}}.
+
+
+* Logging Implementation
+
+ Maven 3.1.0 ships bundled with {{{http://www.slf4j.org/apidocs/org/slf4j/impl/SimpleLogger.html}SLF4J simple logger}},
+ but is ready to use other logging implementations:
+ {{{./apidocs/org/apache/maven/cli/logging/Slf4jConfigurationFactory.html}Slf4jConfigurationFactory}} /
+ {{{./apidocs/org/apache/maven/cli/logging/Slf4jConfiguration.html}Slf4jConfiguration}} brings extensions to slf4j API
+ necessary to Maven.
 
 * Getting Logger Instance
 
@@ -59,7 +76,8 @@ public class DefaultMyComponent
 +------+
 
  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.
+ Maven 3.1.0, then this technique can be used safely only in Maven core components or in plugins/component not requiring
+ compatibility with previous Maven versions.
  
 +-----+
 import org.slf4j.Logger;


[2/2] git commit: javadoc improvement

Posted by hb...@apache.org.
javadoc improvement

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

Branch: refs/heads/master
Commit: ea97145dfc3dc0bd7a1c795b5af89dc3b59da76b
Parents: aaa198a
Author: Hervé Boutemy <hb...@apache.org>
Authored: Fri Aug 2 01:28:45 2013 +0200
Committer: Hervé Boutemy <hb...@apache.org>
Committed: Fri Aug 2 01:28:45 2013 +0200

----------------------------------------------------------------------
 .../org/apache/maven/cli/logging/Slf4jConfigurationFactory.java   | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/maven/blob/ea97145d/maven-embedder/src/main/java/org/apache/maven/cli/logging/Slf4jConfigurationFactory.java
----------------------------------------------------------------------
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 f396133..a5a79a8 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
@@ -29,7 +29,8 @@ import org.slf4j.ILoggerFactory;
 
 /**
  * Slf4jConfiguration factory, loading implementations from <code>META-INF/maven/slf4j-configuration.properties</code>
- * configuration files in class loader.
+ * configuration files in class loader: key is the class name of the ILoggerFactory, value is the class name of
+ * the corresponding Slf4jConfiguration.
  *
  * @author Hervé Boutemy
  * @since 3.1.0