LOG4J2-1349 add package-protected method getThreadContextMap
Project: http://git-wip-us.apache.org/repos/asf/logging-log4j2/repo Commit: http://git-wip-us.apache.org/repos/asf/logging-log4j2/commit/ffdd2d9c Tree: http://git-wip-us.apache.org/repos/asf/logging-log4j2/tree/ffdd2d9c Diff: http://git-wip-us.apache.org/repos/asf/logging-log4j2/diff/ffdd2d9c Branch: refs/heads/LOG4J2-1349-gcfree-threadcontext Commit: ffdd2d9c0f76e3720775c5ff338616e23b99e2dc Parents: 0e9aace Author: rpopma <[email protected]> Authored: Sun Aug 21 10:29:37 2016 +0900 Committer: rpopma <[email protected]> Committed: Tue Aug 23 00:31:13 2016 +0900 ---------------------------------------------------------------------- .../java/org/apache/logging/log4j/ThreadContext.java | 12 ++++++++++++ 1 file changed, 12 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/ffdd2d9c/log4j-api/src/main/java/org/apache/logging/log4j/ThreadContext.java ---------------------------------------------------------------------- diff --git a/log4j-api/src/main/java/org/apache/logging/log4j/ThreadContext.java b/log4j-api/src/main/java/org/apache/logging/log4j/ThreadContext.java index c932746..e0a88dc 100644 --- a/log4j-api/src/main/java/org/apache/logging/log4j/ThreadContext.java +++ b/log4j-api/src/main/java/org/apache/logging/log4j/ThreadContext.java @@ -356,6 +356,18 @@ public final class ThreadContext { } /** + * Returns the internal data structure used to store thread context key-value pairs. + * <p><em> + * This data structure is not intended to be used directly by applications. This method is package protected for + * internal log4j2 usage. + * </em></p> + * @return the internal data structure used to store thread context key-value pairs + */ + static ThreadContextMap getThreadContextMap() { + return contextMap; + } + + /** * Returns true if the Map is empty. * * @return true if the Map is empty, false otherwise.
