Repository: logging-log4j2 Updated Branches: refs/heads/master ad7b5ab40 -> 2ede23aef
LOG4J2-1293 site improvements: document system properties to control garbage-free behaviour in configuration.html Project: http://git-wip-us.apache.org/repos/asf/logging-log4j2/repo Commit: http://git-wip-us.apache.org/repos/asf/logging-log4j2/commit/10031068 Tree: http://git-wip-us.apache.org/repos/asf/logging-log4j2/tree/10031068 Diff: http://git-wip-us.apache.org/repos/asf/logging-log4j2/diff/10031068 Branch: refs/heads/master Commit: 10031068ae702f05ed997e27ef082a496b7acfb0 Parents: a711b61 Author: rpopma <[email protected]> Authored: Sun May 22 15:49:54 2016 +0900 Committer: rpopma <[email protected]> Committed: Sun May 22 15:49:54 2016 +0900 ---------------------------------------------------------------------- src/site/xdoc/manual/configuration.xml.vm | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/10031068/src/site/xdoc/manual/configuration.xml.vm ---------------------------------------------------------------------- diff --git a/src/site/xdoc/manual/configuration.xml.vm b/src/site/xdoc/manual/configuration.xml.vm index 7362344..3224fa0 100644 --- a/src/site/xdoc/manual/configuration.xml.vm +++ b/src/site/xdoc/manual/configuration.xml.vm @@ -1697,7 +1697,8 @@ public class AwesomeTest { <td> If <tt>true</tt>, log4j's JMX notifications are sent from a separate background thread, otherwise they are sent from the caller thread. - If the <tt>javax.servlet.Servlet</tt> class is on the classpath, the default behaviour + If system property <tt>log4j2.is.webapp</tt> is <tt>true</tt> or the <tt>javax.servlet.Servlet</tt> + class is on the classpath, the default behaviour is to use the caller thread to send JMX notifications. </td> </tr> @@ -1958,6 +1959,26 @@ public class AwesomeTest { <td>In GC-free mode, this property determines the maximum size of the reusable StringBuilders where the message text is formatted and potentially passed to background threads.</td> </tr> + <tr> + <td>log4j2.is.webapp</td> + <td>true if <tt>Servlet</tt> class on class path </td> + <td>This system property can be used to force Log4j 2 to behave as if it is part of a web application (when true) + or as if it is not part of a web application (when false).</td> + </tr> + <tr> + <td>log4j2.enable.threadlocals</td> + <td>true</td> + <td>This system property can be used to switch off the use of threadlocals, which will partly disable + Log4j's garbage-free behaviour: to be fully garbage-free, Log4j stores + objects in ThreadLocal fields to reuse them, otherwise new objects are created for each log event. + Note that this property is not effective when Log4j detects it is running in a web application.</td> + </tr> + <tr> + <td>log4j2.enable.direct.encoders</td> + <td>true</td> + <td>Garbage-aware Layouts that convert log events to text will convert this text to bytes + without creating temporary objects when this property is true.</td> + </tr> </table> </subsection>
