Return-Path: X-Original-To: apmail-logging-log4j-dev-archive@www.apache.org Delivered-To: apmail-logging-log4j-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id C073AF1FA for ; Wed, 24 Apr 2013 05:35:23 +0000 (UTC) Received: (qmail 88545 invoked by uid 500); 24 Apr 2013 05:35:23 -0000 Delivered-To: apmail-logging-log4j-dev-archive@logging.apache.org Received: (qmail 87028 invoked by uid 500); 24 Apr 2013 05:35:19 -0000 Mailing-List: contact log4j-dev-help@logging.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Log4J Developers List" Reply-To: "Log4J Developers List" Delivered-To: mailing list log4j-dev@logging.apache.org Received: (qmail 86656 invoked by uid 99); 24 Apr 2013 05:35:17 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 24 Apr 2013 05:35:17 +0000 Date: Wed, 24 Apr 2013 05:35:17 +0000 (UTC) From: "Remko Popma (JIRA)" To: log4j-dev@logging.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Created] (LOG4J2-219) Named logger without root logger ends up with empty Appenders map - does not log anything MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 Remko Popma created LOG4J2-219: ---------------------------------- Summary: Named logger without root logger ends up with empty Appenders map - does not log anything Key: LOG4J2-219 URL: https://issues.apache.org/jira/browse/LOG4J2-219 Project: Log4j 2 Issue Type: Bug Components: Core Affects Versions: 2.0-beta5 Reporter: Remko Popma On the log4j-user mailing list, Peter DePasquale gave this test case that demonstrates the problem: Note that the configuration has no root logger, but only contains a named logger. In a debugger I found that the LoggerConfig for "logtest.LogTest" ended up with an empty "appenders" Map>. The appenderRefs list did contain an AppenderRef object but in #callAppenders there are no AppenderControl objects to call... (Sorry, I have been unable to find out the underlying cause yet.) package logtest; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; import org.apache.logging.log4j.core.config.XMLConfigurationFactory; public class LogTest { public static void main(String[] args) { System.setProperty(XMLConfigurationFactory.CONFIGURATION_FILE_PROPERTY, "log4j2-roottest.xml"); Logger logger = LogManager.getLogger(LogTest.class); logger.trace("This is a trace message"); logger.info("This is an info message"); logger.warn("This is a warning message"); } } -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org For additional commands, e-mail: log4j-dev-help@logging.apache.org