Return-Path: X-Original-To: apmail-tomcat-users-archive@www.apache.org Delivered-To: apmail-tomcat-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 6ED9210F50 for ; Thu, 9 Jan 2014 18:52:36 +0000 (UTC) Received: (qmail 74914 invoked by uid 500); 9 Jan 2014 18:50:00 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 74806 invoked by uid 500); 9 Jan 2014 18:49:51 -0000 Mailing-List: contact users-help@tomcat.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Tomcat Users List" Delivered-To: mailing list users@tomcat.apache.org Received: (qmail 74337 invoked by uid 99); 9 Jan 2014 18:49:15 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 09 Jan 2014 18:49:15 +0000 X-ASF-Spam-Status: No, hits=2.2 required=5.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of jsb_tomcat@360works.com designates 96.38.234.67 as permitted sender) Received: from [96.38.234.67] (HELO hermes.360works.com) (96.38.234.67) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 09 Jan 2014 18:49:08 +0000 Received: from jesse.360works.com (jesse.360works.com [96.38.234.81]) by hermes.360works.com (Postfix) with ESMTP id 5379F1C7E11B for ; Thu, 9 Jan 2014 13:49:15 -0500 (EST) From: Jesse Barnum Content-Type: multipart/alternative; boundary="Apple-Mail=_943AB5C5-E677-4213-AC4F-85A696FE05C6" Subject: Name log files based on Context name? Message-Id: <8F14481D-43FF-4DA6-BDC3-02634DA7058E@360works.com> Date: Thu, 9 Jan 2014 13:48:46 -0500 To: Tomcat Users List Mime-Version: 1.0 (Mac OS X Mail 6.6 \(1510\)) X-Mailer: Apple Mail (2.1510) X-Virus-Checked: Checked by ClamAV on apache.org --Apple-Mail=_943AB5C5-E677-4213-AC4F-85A696FE05C6 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii I want my log files to be written to a log file with the same name as my = webapp. Users can dynamically re-name my webapp when they run my = installer, so that they can have multiple instances running, so = hard-coding the context name is not a good approach. Is there some = environment variable that I can use in the log file? > 1catalina.org.apache.juli.FileHandler.level =3D FINE > 1catalina.org.apache.juli.FileHandler.directory =3D = ${catalina.base}/logs > 1catalina.org.apache.juli.FileHandler.prefix =3D MirrorSync. > 1catalina.org.apache.juli.FileHandler.encoding =3D UTF-8 I'd like the word "MirrorSync" to be replaced with the name of the = context where this logging.properties file is loaded from (the = logging.properties file is in my classes/ directory). I tried using = ${context} but it just put that literal value for the log name. My users are mostly running in Tomcat 6, with a few who have upgraded to = 7. --Jesse Barnum, President, 360Works http://www.360works.com Product updates and news on http://facebook.com/360Works (770) 234-9293 =3D=3D Don't lose your data! http://360works.com/safetynet/ for = FileMaker Server =3D=3D --Apple-Mail=_943AB5C5-E677-4213-AC4F-85A696FE05C6--