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 94C7B174A7 for ; Mon, 6 Apr 2015 16:13:17 +0000 (UTC) Received: (qmail 55386 invoked by uid 500); 6 Apr 2015 16:13:12 -0000 Delivered-To: apmail-logging-log4j-dev-archive@logging.apache.org Received: (qmail 55337 invoked by uid 500); 6 Apr 2015 16:13:12 -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 55327 invoked by uid 99); 6 Apr 2015 16:13:12 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 06 Apr 2015 16:13:12 +0000 Date: Mon, 6 Apr 2015 16:13:12 +0000 (UTC) From: "ASF GitHub Bot (JIRA)" To: log4j-dev@logging.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (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 [ https://issues.apache.org/jira/browse/LOG4J2-991?page=3Dcom.atlassian= .jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D1448= 1360#comment-14481360 ]=20 ASF GitHub Bot commented on LOG4J2-991: --------------------------------------- GitHub user ryanrupp opened a pull request: https://github.com/apache/logging-log4j2/pull/9 [LOG4J2-991] Fixed an issue that the async root logger configuration wa= s... ... not defaulting include location to false. =20 This could happen if async loggers were configured without the use of t= he logger context system property as the logic from LoggerConfig.includeLoc= ation was being used instead of AsyncLoggerConfig.includeLocation You can merge this pull request into a Git repository by running: $ git pull https://github.com/ryanrupp/logging-log4j2 LOG4J2-991 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/logging-log4j2/pull/9.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #9 =20 ---- commit 357caceb1246eb048aa6d73432eaecdfc6bffa65 Author: Ryan Rupp Date: 2015-04-06T16:09:31Z [LOG4J2-991] Fixed an issue that the async root logger configuration wa= s not defaulting include location to false. =20 This could happen if async loggers were configured without the use of t= he logger context system property as the logic from LoggerConfig.includeLoc= ation was being used instead of AsyncLoggerConfig.includeLocation ---- > Async root logger config is defaulting includeLocation to true without us= e 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" = where we have the logger 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