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 2F84617C82 for ; Fri, 3 Apr 2015 22:17:53 +0000 (UTC) Received: (qmail 27296 invoked by uid 500); 3 Apr 2015 22:17:53 -0000 Delivered-To: apmail-logging-log4j-dev-archive@logging.apache.org Received: (qmail 27260 invoked by uid 500); 3 Apr 2015 22:17:53 -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 27251 invoked by uid 99); 3 Apr 2015 22:17:52 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 03 Apr 2015 22:17:52 +0000 Date: Fri, 3 Apr 2015 22:17:52 +0000 (UTC) From: "Ryan Rupp (JIRA)" To: log4j-dev@logging.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Created] (LOG4J2-991) Async root logger config is defaulting includeLocation to true without use of Log4jContextSelector system property MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 Ryan Rupp created LOG4J2-991: -------------------------------- Summary: Async root logger config is defaulting includeLocatio= n to true without use of Log4jContextSelector system property Key: LOG4J2-991 URL: https://issues.apache.org/jira/browse/LOG4J2-991 Project: Log4j 2 Issue Type: Bug Affects Versions: 2.1 Reporter: Ryan Rupp Priority: Minor I'm using the approach detailed here - https://logging.apache.org/log4j/2.x= /manual/async.html - under "Mixing Synchronous and Asynchronous Loggers" wh= ere we have the appender defined. I noticed this was slow so lo= oked into it and noticed the location was being captured but I thought this= should default to false for async loggers. Looking into this, the line her= e - https://github.com/apache/logging-log4j2/blob/master/log4j-core/src/mai= n/java/org/apache/logging/log4j/core/async/AsyncLoggerConfig.java#L239 - th= e call to includeLocation() is actually calling LoggerConfig.includeLocatio= n() which checks for the existence of the system property (which we don't h= ave set), therefore include location defaults to true. I think instead it s= hould be calling the includeLocation() static method inside of AsyncLoggerC= onfig here - https://github.com/apache/logging-log4j2/blob/master/log4j-cor= e/src/main/java/org/apache/logging/log4j/core/async/AsyncLoggerConfig.java#= L204 - which would end up defaulting this to false correctly as the include= Location value is actually null since I didn't explicitly configured it. -- This message was sent by Atlassian JIRA (v6.3.4#6332) --------------------------------------------------------------------- To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org For additional commands, e-mail: log4j-dev-help@logging.apache.org