You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: maven-embedder/src/site/apt/logging.apt
+7-12Lines changed: 7 additions & 12 deletions
Original file line number
Diff line number
Diff line change
@@ -25,7 +25,7 @@
25
25
26
26
Maven Logging
27
27
28
-
End-user logging documentation is available {{{/maven-logging.html}in Maven site}}.
28
+
{{{/maven-logging.html}End-user logging documentation}} is available {{{/maven-logging.html}in Maven site}}.
29
29
This documentation is focused on internal implementation details.
30
30
31
31
* Logging API
@@ -48,7 +48,7 @@ Maven Logging
48
48
49
49
* Logging Implementation
50
50
51
-
Maven 3.1.0 ships bundled with {{{http://www.slf4j.org/apidocs/org/slf4j/impl/SimpleLogger.html}SLF4J simple logger}},
51
+
Maven 3.1.0 ships bundled with {{{https://www.slf4j.org/api/org/slf4j/simple/SimpleLogger.html}SLF4J simple logger}} and since 3.5.0 {{{../maven-slf4j-provider/}Maven-customized <<<maven-slf4j-provider>>>}},
52
52
but is ready to use other logging implementations: SLF4J is responsible for loading the implementation, referred to as
~~ TODO document META-INF/maven/slf4j-configuration.properties
66
+
65
67
* Getting Logger Instance
66
68
67
69
Starting with Maven 3.1.0, SLF4J Logger can be used directly. This technique can be used safely in Maven core
@@ -79,14 +81,7 @@ public class MyClass
79
81
80
82
* Logger Name
81
83
82
-
Before Maven 3.1.0, with logging implementation done in Maven, logger name wasn't used by basic console logging implementation:
83
-
they are as-is, without clear convention on when to pass logger from class to class or when to create a new logger.
84
-
85
-
Starting with Maven 3.1.0, logging implementation can be of greatest use if logger names are well defined. This definition still
86
-
needs to be defined and implemented:
87
-
88
-
* classical "class name" pattern?
89
-
90
-
* Maven-specific name hierarchy?
84
+
Logger name is basically the classical fully qualified class name: it's not visible by default, but can be activated (see {{{/maven-logging.html}user documentation}}).
91
85
92
-
* a mix (some with class name, some with Maven-specific hierarchy)?
86
+
Notice that before Maven 3.1.0, with logger created by Maven, some code used to pass logger from class to class because it could not create a new logger:
87
+
discrepencies between logger name and actual class may happen.
0 commit comments