Return-Path: X-Original-To: apmail-logging-commits-archive@minotaur.apache.org Delivered-To: apmail-logging-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id D8C8610C28 for ; Thu, 27 Mar 2014 02:55:49 +0000 (UTC) Received: (qmail 80415 invoked by uid 500); 27 Mar 2014 02:55:49 -0000 Delivered-To: apmail-logging-commits-archive@logging.apache.org Received: (qmail 80383 invoked by uid 500); 27 Mar 2014 02:55:48 -0000 Mailing-List: contact commits-help@logging.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@logging.apache.org Delivered-To: mailing list commits@logging.apache.org Received: (qmail 80345 invoked by uid 99); 27 Mar 2014 02:55:47 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 27 Mar 2014 02:55:47 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 27 Mar 2014 02:55:46 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 83CC3238890D; Thu, 27 Mar 2014 02:55:24 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit 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 -0000 To: commits@logging.apache.org From: mattsicker@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20140327025524.83CC3238890D@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org 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); + } }