Return-Path: X-Original-To: apmail-logging-log4j-user-archive@www.apache.org Delivered-To: apmail-logging-log4j-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 7477018BC8 for ; Mon, 4 Jan 2016 22:27:49 +0000 (UTC) Received: (qmail 4977 invoked by uid 500); 4 Jan 2016 22:27:49 -0000 Delivered-To: apmail-logging-log4j-user-archive@logging.apache.org Received: (qmail 4846 invoked by uid 500); 4 Jan 2016 22:27:48 -0000 Mailing-List: contact log4j-user-help@logging.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Log4J Users List" Reply-To: "Log4J Users List" Delivered-To: mailing list log4j-user@logging.apache.org Received: (qmail 4835 invoked by uid 99); 4 Jan 2016 22:27:48 -0000 Received: from Unknown (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 04 Jan 2016 22:27:48 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id 3AA52C0AFA for ; Mon, 4 Jan 2016 22:27:48 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 0.799 X-Spam-Level: X-Spam-Status: No, score=0.799 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, RCVD_IN_MSPIKE_H2=-0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=disabled Received: from mx1-us-west.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id 8TVTnp8n9pJi for ; Mon, 4 Jan 2016 22:27:41 +0000 (UTC) Received: from mout.gmx.net (mout.gmx.net [212.227.17.20]) by mx1-us-west.apache.org (ASF Mail Server at mx1-us-west.apache.org) with ESMTPS id 5BFEE20F5F for ; Mon, 4 Jan 2016 22:27:41 +0000 (UTC) Received: from [192.168.114.119] ([62.143.145.174]) by mail.gmx.com (mrgmx102) with ESMTPSA (Nemesis) id 0MLi1v-1aFwcK16zj-000qFt for ; Mon, 04 Jan 2016 23:27:39 +0100 Subject: Re: Placeholder substitution in config xml To: Log4J Users List References: From: Veit Guna Message-ID: <568AF1D9.6000904@gmx.de> Date: Mon, 4 Jan 2016 23:27:37 +0100 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.5.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K0:K47gipNEXYTeMMO54n6a40kywFDh9XlT22t9q/Vo/e0HtyhcyTb zZ2o588tuZs/hv4GDhbkqPlyVMWjkWKkC8h8y+m4h0a7426UCBEp3FNB7lJ68WmuhpwQV/j YGwkpIkNFfU1dnXffxj/gNDqy2CDc+NNOXB8+pQ8PkdsaMBWDYKycUlsgaXIRSDK/CyEm3Y hcD0oIMp2dBWoFZWN6kqA== X-UI-Out-Filterresults: notjunk:1;V01:K0:VVrzgMtt1pg=:G0K2IZCKs/aJx7FxeyoPTi vmdmT7ncaWeeU288sNoLLIQLwLur0WB8aQ8+zdOJTnYFr5usJjH4HQx2fnISgQoAzcRpgWxl3 M7YwUmn0wMiaM+8hy23ErxGaJmsa01kxiGxNY4WyH1rsBgRs5jK6by/QZnPqrXOJt0gPyX3JB 5omxzJzoaQSq9JA141Yu6P/hcPfAGrwyM885KBt5Ulep0OHZQOSQ5lBQ4/9DglEJFSBeft+3t LfxQWaHxYNlTOaGn76MEEJ0jkLijIuvUxz5JENP/hWBNffpmLN/tenwodAKGQEJ3GDYhnXpI8 rKn3BrxVTvX4wJwQebBk3LApafcgbl+B1lLQhKrpavo9ztuBfklSDF2Amwe4PHf290Cj7Umhe t1Xmt2XxRp/bs60fBErScaA0LdY2pa1FENHoqfOhve6+Hoabu//j7hKDfP7cb/nr3jAFwACqe YCkWj6AxrnWDuerWh398h/wO6bFWFWsq05gVMEiBcAT8HdxywRETfpW5tuL1k6pm++GWzUGDr Qlvwb+pLlT6OoqLAYqufVnkFN+jj4rxtD3ZoemX0w5fIwYE10WS4NCWqAgQnFy4UC1c6T9ka7 hXY8hK71f+kqsGwzl9irILK0BXundrmKcRI/3EU4zCIDPv/+TwIs7fjLbBZP9p2nl2RdVOcNv bsXhQhABkuIDDTHPAKLiWozvw98KpUUwjAcjYcpK7ABhfuJPZ0ZgFLCDHUlbDYPFlKtRFSVnK 3sMRoZTsYsyxVd3LdflfqCUup69uBlogDjHB/lH5xiUV3d49b4sovaKjUOxAasIy71ZAnyrX+ 9W9s8RH Thanks for the feedback! Tracking it here: https://issues.apache.org/jira/browse/LOG4J2-1243 Cheers Veit Am 04.01.2016 um 22:27 schrieb Remko Popma: > Looks like the properties lookup does not account fully for default values that are themselves lookups. Can you create a Jira ticket for this? > > Thanks! > Remko > > Sent from my iPhone > >> On 2016/01/04, at 23:56, Veit Guna wrote: >> >> Small correction: the system property is set via "-Dmyapp.logs=foobar", of course. >> Just a typo during posting... >> >> >> >> >> Gesendet: Montag, 04. Januar 2016 um 14:45 Uhr >> Von: "Veit Guna" >> An: log4j-user@logging.apache.org >> Betreff: Placeholder substitution in config xml >> Hi. >> >> I'm using log4j 2.5 in a REST service. >> There I would like to use the placeholder substitution to allow configuration of the log location. >> >> I tried this: >> >> >> >> ${sys:mypapp.logs:-${env:MYAPP_LOGS:-logs}} >> >> >> This seems to work quite well with the exception, if myapp.logs is set, the path >> ends with "}". So if I set the system property "-Depss.logs=foobar" it creates >> the directory "foobar}" and puts the logs into that. For the ENV substitution >> it works. It also works when NO placeholder nesting is performed. So I guess >> the problem has something todo with that. >> >> Can somebody confirm seeing the same? >> >> Thanks >> Veit >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org >> For additional commands, e-mail: log4j-user-help@logging.apache.org >> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org >> For additional commands, e-mail: log4j-user-help@logging.apache.org >> > --------------------------------------------------------------------- > To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org > For additional commands, e-mail: log4j-user-help@logging.apache.org > --------------------------------------------------------------------- To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org For additional commands, e-mail: log4j-user-help@logging.apache.org