logging-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mattsic...@apache.org
Subject svn commit: r1582162 - /logging/log4j/log4j2/trunk/log4j-core/src/test/java/org/apache/logging/log4j/junit/InitialLoggerContext.java
Date Thu, 27 Mar 2014 02:55:24 GMT
Author: mattsicker
Date: Thu Mar 27 02:55:24 2014
New Revision: 1582162

URL: http://svn.apache.org/r1582162
Log:
Add some convenience methods to InitialLoggerContext.

Modified:
    logging/log4j/log4j2/trunk/log4j-core/src/test/java/org/apache/logging/log4j/junit/InitialLoggerContext.java

Modified: logging/log4j/log4j2/trunk/log4j-core/src/test/java/org/apache/logging/log4j/junit/InitialLoggerContext.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/log4j-core/src/test/java/org/apache/logging/log4j/junit/InitialLoggerContext.java?rev=1582162&r1=1582161&r2=1582162&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/log4j-core/src/test/java/org/apache/logging/log4j/junit/InitialLoggerContext.java
(original)
+++ logging/log4j/log4j2/trunk/log4j-core/src/test/java/org/apache/logging/log4j/junit/InitialLoggerContext.java
Thu Mar 27 02:55:24 2014
@@ -1,6 +1,9 @@
 package org.apache.logging.log4j.junit;
 
+import org.apache.logging.log4j.core.Appender;
+import org.apache.logging.log4j.core.Logger;
 import org.apache.logging.log4j.core.LoggerContext;
+import org.apache.logging.log4j.core.config.Configuration;
 import org.apache.logging.log4j.core.config.Configurator;
 import org.junit.rules.TestRule;
 import org.junit.runner.Description;
@@ -41,4 +44,16 @@ public class InitialLoggerContext implem
     public LoggerContext getContext() {
         return context;
     }
+
+    public Logger getLogger(final String name) {
+        return context.getLogger(name);
+    }
+
+    public Configuration getConfiguration() {
+        return context.getConfiguration();
+    }
+
+    public Appender getAppender(final String name) {
+        return getConfiguration().getAppenders().get(name);
+    }
 }



Mime
View raw message