You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@logging.apache.org by rp...@apache.org on 2016/08/19 07:16:07 UTC
[42/50] logging-log4j2 git commit: LOG4J2-1284 improve documentation
for customizing MessageFactory
LOG4J2-1284 improve documentation for customizing MessageFactory
Project: http://git-wip-us.apache.org/repos/asf/logging-log4j2/repo
Commit: http://git-wip-us.apache.org/repos/asf/logging-log4j2/commit/4ac50ceb
Tree: http://git-wip-us.apache.org/repos/asf/logging-log4j2/tree/4ac50ceb
Diff: http://git-wip-us.apache.org/repos/asf/logging-log4j2/diff/4ac50ceb
Branch: refs/heads/LOG4J2-1010&LOG4J2-1447-injectable-contextdata&better-datastructure
Commit: 4ac50ceba88211296706a99cf8737c6971b2febf
Parents: 304da03
Author: rpopma <rp...@apache.org>
Authored: Fri Aug 19 09:54:28 2016 +0900
Committer: rpopma <rp...@apache.org>
Committed: Fri Aug 19 09:54:28 2016 +0900
----------------------------------------------------------------------
src/site/site.xml | 2 ++
src/site/xdoc/manual/extending.xml | 14 +++++++++++++-
2 files changed, 15 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/4ac50ceb/src/site/site.xml
----------------------------------------------------------------------
diff --git a/src/site/site.xml b/src/site/site.xml
index be509ba..d5e7f53 100644
--- a/src/site/site.xml
+++ b/src/site/site.xml
@@ -196,6 +196,8 @@
<item name="ContextSelector" href="/manual/extending.html#ContextSelector"/>
<item name="ConfigurationFactory" href="/manual/extending.html#ConfigurationFactory"/>
<item name="LoggerConfig" href="/manual/extending.html#LoggerConfig"/>
+ <item name="LogEventFactory" href="/manual/extending.html#LogEventFactory"/>
+ <item name="MessageFactory" href="/manual/extending.html#MessageFactory"/>
<item name="Lookups" href="/manual/extending.html#Lookups"/>
<item name="Filters" href="/manual/extending.html#Filters"/>
<item name="Appenders" href="/manual/extending.html#Appenders"/>
http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/4ac50ceb/src/site/xdoc/manual/extending.xml
----------------------------------------------------------------------
diff --git a/src/site/xdoc/manual/extending.xml b/src/site/xdoc/manual/extending.xml
index 9708e9e..d625edd 100644
--- a/src/site/xdoc/manual/extending.xml
+++ b/src/site/xdoc/manual/extending.xml
@@ -93,7 +93,7 @@
<subsection name="ConfigurationFactory">
<p>
Modifying the way in which logging can be configured is usually one of the areas with the most
- interest. The primary method for doing that is by implementing or extending a
+ interest. The primary method for doing that is by implementing or extending a
<a href="../log4j-core/apidocs/org/apache/logging/log4j/core/config/ConfigurationFactory.html">ConfigurationFactory</a>.
Log4j provides two ways of adding new ConfigurationFactories. The first is by defining the system
property named "log4j.configurationFactory" to the name of the class that should be searched first
@@ -170,7 +170,19 @@ public static class RootLogger extends LoggerConfig {
<p>A LogEventFactory is used to generate LogEvents. Applications may replace the standard LogEventFactory
by setting the value of the system property Log4jLogEventFactory to the name of the custom
LogEventFactory class. </p>
+ <p>Note: When log4j is configured to have <a href="async.html#AllAsync">all loggers asynchronous</a>,
+ log events are pre-allocated in a ring buffer and the LogEventFactory is not used.</p>
</subsection>
+ <subsection name="MessageFactory">
+ <p>A MessageFactory is used to generate Message objects. Applications may replace the standard
+ ParameterizedMessageFactory (or ReusableMessageFactory in garbage-free mode)
+ by setting the value of the system property log4j2.messageFactory to the name of the custom
+ MessageFactory class. </p>
+ <p>Flow messages for the <tt>Logger.entry()</tt> and <tt>Logger.exit()</tt> methods have a separate FlowMessageFactory.
+ Applications may replace the DefaultFlowMessageFactory by setting the value of the system property
+ log4j2.flowMessageFactory to the name of the custom FlowMessageFactory class.
+ </p>
+ </subsection>
<subsection name="Lookups">
<p>
Lookups are the means in which parameter substitution is performed. During Configuration initialization