You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@logging.apache.org by ma...@apache.org on 2015/10/25 07:44:40 UTC
[1/2] logging-log4j2 git commit: Update documentation for Converters
and LOG4J2-948.
Repository: logging-log4j2
Updated Branches:
refs/heads/master 365e427f4 -> e17bd05b5
Update documentation for Converters and LOG4J2-948.
Project: http://git-wip-us.apache.org/repos/asf/logging-log4j2/repo
Commit: http://git-wip-us.apache.org/repos/asf/logging-log4j2/commit/8fcdf3a8
Tree: http://git-wip-us.apache.org/repos/asf/logging-log4j2/tree/8fcdf3a8
Diff: http://git-wip-us.apache.org/repos/asf/logging-log4j2/diff/8fcdf3a8
Branch: refs/heads/master
Commit: 8fcdf3a8fa4ce76a57e680c6068edb9e7d767425
Parents: 365e427
Author: Matt Sicker <bo...@gmail.com>
Authored: Sun Oct 25 01:42:21 2015 -0500
Committer: Matt Sicker <bo...@gmail.com>
Committed: Sun Oct 25 01:42:21 2015 -0500
----------------------------------------------------------------------
src/site/xdoc/manual/plugins.xml | 27 +++++++++++++++------------
1 file changed, 15 insertions(+), 12 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/8fcdf3a8/src/site/xdoc/manual/plugins.xml
----------------------------------------------------------------------
diff --git a/src/site/xdoc/manual/plugins.xml b/src/site/xdoc/manual/plugins.xml
index 37aca9c..72b4fa8 100644
--- a/src/site/xdoc/manual/plugins.xml
+++ b/src/site/xdoc/manual/plugins.xml
@@ -148,21 +148,24 @@
<p>
Converters are used by
<a class="javadoc" href="../log4j-core/apidocs/org/apache/logging/log4j/core/layout/PatternLayout.html">PatternLayout</a>
- to render the elements identified by the conversion pattern. Every converter must specify its type as
- "Converter" on the Plugin attribute, have a static newInstance method that accepts an array of Strings as
- its only parameter and returns an instance of the Converter, and must have a ConverterKeys annotation
- present that contains the array of converter patterns that will cause the Converter to be selected.
- Converters that are meant to handle LogEvents must extend the LogEventPatternConverter class and
- must implement a format method that accepts a LogEvent and a StringBuilder as arguments. The Converter
- should append the result of its operation to the StringBuilder.
+ to render the elements identified by the conversion pattern. Every converter must specify its category as
+ "Converter" on the <code>@Plugin</code> annotation, have a static <code>newInstance</code> method that
+ accepts an array of <code>String</code>s as its only parameter and returns an instance of the Converter, and
+ must have a <code>@ConverterKeys</code> annotation present that contains the array of converter patterns
+ that will cause the Converter to be selected. Converters that are meant to handle <code>LogEvent</code>s
+ must extend the
+ <a class="javadoc" href="../log4j-core/apidocs/org/apache/logging/log4j/core/layout/LogEventPatternConverter.html">LogEventPatternConverter</a>
+ class and must implement a format method that accepts a <code>LogEvent</code> and a <code>StringBuilder</code>
+ as arguments. The Converter should append the result of its operation to the <code>StringBuilder</code>.
</p>
<p>
A second type of Converter is the FileConverter - which must have "FileConverter" specified in the
- type attribute of the Plugin annotation. While similar to a LogEventPatternConverter, instead
- of a single format method these Converters will have two variations; one that takes an Object and
- one that takes an array of Objects instead of the LogEvent. Both append to the provided StringBuilder
- in the same fashion as a LogEventPatternConverter. These Converters are typically used by the
- RollingFileAppender to construct the name of the file to log to.
+ category attribute of the <code>@Plugin</code> annotation. While similar to a <code>LogEventPatternConverter</code>,
+ instead of a single format method these Converters will have two variations; one that takes an
+ <code>Object</code> and one that takes an array of <code>Object</code>s instead of the <code>LogEvent</code>.
+ Both append to the provided <code>StringBuilder</code> in the same fashion as a <code>LogEventPatternConverter</code>.
+ These Converters are typically used by the <code>RollingFileAppender</code> to construct the name of the
+ file to log to.
</p>
<p>
If multiple Converters specify the same <code>ConverterKeys</code>, then the load order above determines
[2/2] logging-log4j2 git commit: Add changelog for LOG4J2-948.
Posted by ma...@apache.org.
Add changelog for LOG4J2-948.
Project: http://git-wip-us.apache.org/repos/asf/logging-log4j2/repo
Commit: http://git-wip-us.apache.org/repos/asf/logging-log4j2/commit/e17bd05b
Tree: http://git-wip-us.apache.org/repos/asf/logging-log4j2/tree/e17bd05b
Diff: http://git-wip-us.apache.org/repos/asf/logging-log4j2/diff/e17bd05b
Branch: refs/heads/master
Commit: e17bd05b5daf456b951ba940e3df59e515fa0e8a
Parents: 8fcdf3a
Author: Matt Sicker <bo...@gmail.com>
Authored: Sun Oct 25 01:44:26 2015 -0500
Committer: Matt Sicker <bo...@gmail.com>
Committed: Sun Oct 25 01:44:26 2015 -0500
----------------------------------------------------------------------
src/changes/changes.xml | 3 +++
1 file changed, 3 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/e17bd05b/src/changes/changes.xml
----------------------------------------------------------------------
diff --git a/src/changes/changes.xml b/src/changes/changes.xml
index 55ad2ad..172c2fa 100644
--- a/src/changes/changes.xml
+++ b/src/changes/changes.xml
@@ -81,6 +81,9 @@
<action issue="LOG4J2-1157" dev="mattsicker" type="fix" due-to="Norbert Bartels">
Fix compilation error for classes annotated with @Plugin.
</action>
+ <action issue="LOG4J2-948" dev="mattsicker" type="fix" due-to="Andrew Flower">
+ Fix plugin documentation error about Converters.
+ </action>
</release>
<release version="2.4.1" date="2015-10-08" description="GA Release 2.4.1">
<action issue="LOG4J2-1129" dev="rgoers" type="add">