You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@logging.apache.org by gg...@apache.org on 2016/06/02 21:49:33 UTC
logging-log4j2 git commit: Add
org.apache.logging.log4j.junit.LoggerContextRule.getRootLogger().
Repository: logging-log4j2
Updated Branches:
refs/heads/master fc4f12545 -> 7a8f3c8ff
Add org.apache.logging.log4j.junit.LoggerContextRule.getRootLogger().
Project: http://git-wip-us.apache.org/repos/asf/logging-log4j2/repo
Commit: http://git-wip-us.apache.org/repos/asf/logging-log4j2/commit/7a8f3c8f
Tree: http://git-wip-us.apache.org/repos/asf/logging-log4j2/tree/7a8f3c8f
Diff: http://git-wip-us.apache.org/repos/asf/logging-log4j2/diff/7a8f3c8f
Branch: refs/heads/master
Commit: 7a8f3c8ff5cb82f712a2723aafe94f8cad23ca43
Parents: fc4f125
Author: ggregory <gg...@apache.org>
Authored: Thu Jun 2 14:49:30 2016 -0700
Committer: ggregory <gg...@apache.org>
Committed: Thu Jun 2 14:49:30 2016 -0700
----------------------------------------------------------------------
.../org/apache/logging/log4j/junit/LoggerContextRule.java | 10 ++++++++++
1 file changed, 10 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/7a8f3c8f/log4j-core/src/test/java/org/apache/logging/log4j/junit/LoggerContextRule.java
----------------------------------------------------------------------
diff --git a/log4j-core/src/test/java/org/apache/logging/log4j/junit/LoggerContextRule.java b/log4j-core/src/test/java/org/apache/logging/log4j/junit/LoggerContextRule.java
index 789a5fe..9fc0ece 100644
--- a/log4j-core/src/test/java/org/apache/logging/log4j/junit/LoggerContextRule.java
+++ b/log4j-core/src/test/java/org/apache/logging/log4j/junit/LoggerContextRule.java
@@ -70,6 +70,7 @@ public class LoggerContextRule implements TestRule {
this.contextSelectorClass = contextSelectorClass;
}
+
@Override
public Statement apply(final Statement base, final Description description) {
// Hack: Using -DEBUG as a JVM param sets a property called "EBUG"...
@@ -205,6 +206,15 @@ public class LoggerContextRule implements TestRule {
return appender;
}
+ /**
+ * Gets the root logger.
+ *
+ * @return the root logger.
+ */
+ public Logger getRootLogger() {
+ return context.getRootLogger();
+ }
+
@Override
public String toString() {
StringBuilder builder = new StringBuilder();