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 DC95C178B1 for ; Wed, 10 Jun 2015 14:37:06 +0000 (UTC) Received: (qmail 95986 invoked by uid 500); 10 Jun 2015 14:37:06 -0000 Delivered-To: apmail-logging-log4j-user-archive@logging.apache.org Received: (qmail 95935 invoked by uid 500); 10 Jun 2015 14:37:06 -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 95924 invoked by uid 99); 10 Jun 2015 14:37:06 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 10 Jun 2015 14:37:06 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of adam.retter@googlemail.com designates 209.85.215.53 as permitted sender) Received: from [209.85.215.53] (HELO mail-la0-f53.google.com) (209.85.215.53) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 10 Jun 2015 14:34:52 +0000 Received: by laar3 with SMTP id r3so34455302laa.3 for ; Wed, 10 Jun 2015 07:36:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; bh=a/rxQ2vTAHP64ZwdwrtBsLlrkZtVP19fNzNY1C3jmWo=; b=Ahd2+N3QJlxTK78paVKTWK4mSkm1NaUHAdFni33+JolwmzfrDM/TuMhckZ7hskDw5/ kE33Sfo+ytk3e3LXy9e3+J7KWUFJtzI+m2t9QsngSPJD6WZc4l+myQM5MXs8vz5z9CQX 6g73f1mEX+MCYyaNclP/Ie4u+ZVqHxpyqcjh7LHm+AaSmY9Ni8/dvnru4AbjYtywYQ4v Mmqk8BgA5Gkut2NcZ/nxPICWAHK0Jm3YdGPIoV5wGU4+Q/MoWmtmHVnVoGESd0yTgSpK fsrcImexwymv6wRpPLZb+EyCBj04VNx5SDZiKdKoIO8LDPPVjD/6ocYRnrDtMruRX1PQ A0Ow== MIME-Version: 1.0 X-Received: by 10.112.148.166 with SMTP id tt6mr4306328lbb.11.1433947000664; Wed, 10 Jun 2015 07:36:40 -0700 (PDT) Received: by 10.25.20.215 with HTTP; Wed, 10 Jun 2015 07:36:40 -0700 (PDT) In-Reply-To: <00427666-5DCF-4D53-98A4-865FE06E8D7D@dslextreme.com> References: <12BC8773-1D56-4F64-8081-C006E9F4D07F@dslextreme.com> <00427666-5DCF-4D53-98A4-865FE06E8D7D@dslextreme.com> Date: Wed, 10 Jun 2015 15:36:40 +0100 Message-ID: Subject: Re: Write log files relative to log4j2.xml? From: Adam Retter To: Log4J Users List Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org Okay thanks, I have submitted a patch here - https://issues.apache.org/jira/browse/LOG4J2-1050 On 10 June 2015 at 01:08, Ralph Goers wrote: > Create a Jira issue. If you could actually create a patch the likelihood = that it will get solved sooner is much higher. > > Ralhp > >> On Jun 9, 2015, at 3:08 PM, Adam Retter wro= te: >> >> Okay thanks Ralph, >> >> How would I go about getting such a change submitted to the project? >> >> On 9 June 2015 at 22:36, Ralph Goers wrote: >>> There is nothing now but I would imagine it wouldn=E2=80=99t be too dif= ficult to add a variable that contains the base url or path of the configur= ation file in use. >>> >>> Ralph >>> >>>> On Jun 9, 2015, at 12:08 PM, Adam Retter = wrote: >>>> >>>> Hi there, >>>> >>>> Is it somehow possible to specify that the log4j2 log files should be >>>> written somewhere relative to the configuration file? >>>> >>>> For example my config file is here - /somewhere/my-app/logj2.xml >>>> >>>> I would like to ensure that regardless of which folder my application >>>> is started from then my log files are always written to - >>>> /somewhere/my-app/var/log >>>> >>>> My log4j2.xml has something like this - >>>> >>>> >>> filePattern=3D"var/log/my-app.log.gz" fileName=3D"var/log/my-app.log"> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> However, var/log/my-app.log is always written relative to the folder >>>> where my-app is started from and not relative to where the config file >>>> is. >>>> >>>> Any ideas? >>>> >>>> -- >>>> Adam Retter >>>> >>>> skype: adam.retter >>>> tweet: adamretter >>>> http://www.adamretter.org.uk >>>> >>>> --------------------------------------------------------------------- >>>> 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 >>> >> >> >> >> -- >> Adam Retter >> >> skype: adam.retter >> tweet: adamretter >> http://www.adamretter.org.uk >> >> --------------------------------------------------------------------- >> 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 > --=20 Adam Retter skype: adam.retter tweet: adamretter http://www.adamretter.org.uk --------------------------------------------------------------------- To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org For additional commands, e-mail: log4j-user-help@logging.apache.org