Repository: logging-log4j2 Updated Branches: refs/heads/master 671c81c05 -> 0cf1df05e
LOG4J2-1419 add documentation and use better system property name for triggering stacktrace on LoggerContext start Project: http://git-wip-us.apache.org/repos/asf/logging-log4j2/repo Commit: http://git-wip-us.apache.org/repos/asf/logging-log4j2/commit/0cf1df05 Tree: http://git-wip-us.apache.org/repos/asf/logging-log4j2/tree/0cf1df05 Diff: http://git-wip-us.apache.org/repos/asf/logging-log4j2/diff/0cf1df05 Branch: refs/heads/master Commit: 0cf1df05e01ef37a41da167f84fc46e26d592c8f Parents: 671c81c Author: rpopma <[email protected]> Authored: Tue Jun 14 00:32:08 2016 +0900 Committer: rpopma <[email protected]> Committed: Tue Jun 14 00:32:08 2016 +0900 ---------------------------------------------------------------------- .../main/java/org/apache/logging/log4j/core/LoggerContext.java | 2 +- src/site/xdoc/manual/configuration.xml.vm | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/0cf1df05/log4j-core/src/main/java/org/apache/logging/log4j/core/LoggerContext.java ---------------------------------------------------------------------- diff --git a/log4j-core/src/main/java/org/apache/logging/log4j/core/LoggerContext.java b/log4j-core/src/main/java/org/apache/logging/log4j/core/LoggerContext.java index 578a781..1cad582 100644 --- a/log4j-core/src/main/java/org/apache/logging/log4j/core/LoggerContext.java +++ b/log4j-core/src/main/java/org/apache/logging/log4j/core/LoggerContext.java @@ -206,7 +206,7 @@ public class LoggerContext extends AbstractLifeCycle implements org.apache.loggi @Override public void start() { LOGGER.debug("Starting LoggerContext[name={}, {}]...", getName(), this); - if (PropertiesUtil.getProperties().getBooleanProperty("log4j.LoggerContext.trace.start", false)) { + if (PropertiesUtil.getProperties().getBooleanProperty("log4j.LoggerContext.stacktrace.on.start", false)) { LOGGER.debug("Stack trace to locate invoker", new Exception("Not a real error, showing stack trace to locate invoker")); } http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/0cf1df05/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 3808d4d..2ac69eb 100644 --- a/src/site/xdoc/manual/configuration.xml.vm +++ b/src/site/xdoc/manual/configuration.xml.vm @@ -1998,6 +1998,12 @@ public class AwesomeTest { If more slots are required, set system property <tt>log4j.unbox.ringbuffer.size</tt> to the desired ring buffer size. Note that the specified number will be rounded up to the nearest power of 2.</p></td> </tr> + <tr> + <td><a name="log4j.LoggerContext.stacktrace.on.start" />log4j.LoggerContext.stacktrace.on.start</td> + <td>false</td> + <td>Prints a stacktrace to the <a href="#StatusMessages">status logger</a> at DEBUG level + when the LoggerContext is started. For debug purposes.</td> + </tr> </table> </subsection>
