Return-Path: Delivered-To: apmail-jakarta-tomcat-user-archive@apache.org Received: (qmail 75811 invoked from network); 19 Feb 2003 21:32:38 -0000 Received: from exchange.sun.com (192.18.33.10) by daedalus.apache.org with SMTP; 19 Feb 2003 21:32:38 -0000 Received: (qmail 29069 invoked by uid 97); 19 Feb 2003 21:34:16 -0000 Delivered-To: qmlist-jakarta-archive-tomcat-user@nagoya.betaversion.org Received: (qmail 29062 invoked from network); 19 Feb 2003 21:34:16 -0000 Received: from daedalus.apache.org (HELO apache.org) (208.185.179.12) by nagoya.betaversion.org with SMTP; 19 Feb 2003 21:34:16 -0000 Received: (qmail 74396 invoked by uid 500); 19 Feb 2003 21:32:19 -0000 Mailing-List: contact tomcat-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Tomcat Users List" Reply-To: "Tomcat Users List" Delivered-To: mailing list tomcat-user@jakarta.apache.org Received: (qmail 74383 invoked from network); 19 Feb 2003 21:32:18 -0000 Received: from unknown (HELO darksleep.com) (192.204.202.251) by daedalus.apache.org with SMTP; 19 Feb 2003 21:32:18 -0000 Received: by darksleep.com (Postfix, from userid 1009) id EF8AC3C1C6; Wed, 19 Feb 2003 16:27:51 -0500 (EST) Date: Wed, 19 Feb 2003 16:27:51 -0500 From: "Steven J. Owens" To: Tomcat Users List Subject: Re: Best Logging practices Message-ID: <20030219212751.GA22358@darksleep.com> Reply-To: puff@darksleep.com References: <5.2.0.9.2.20030219080853.02cd89b0@shell.visi.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5.2.0.9.2.20030219080853.02cd89b0@shell.visi.com> User-Agent: Mutt/1.4i Sender: Steven J.Owens X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N On Wed, Feb 19, 2003 at 08:15:20AM -0600, Jacob Kjome wrote: > Don't count on being able to write to anywhere within your webapp. Tomcat, > by default, expands your webapp to a directory and deploys your app from > there. This gives you access to within your webapp via File IO. However, > this is not guaranteed by the servlet spec. Your app can be run directly > from the .war archive where you will have no File system access within the > webapp structure. So, either provide some configuration for logging to a > directory outside the webapp and allow the setting to be modifiable in the > deployment configuration (such as a nested in a Tomcat > entry) or do your logging to console or some other non-File > appender. This is something that's bugged me for quite a while (in fact, since jars were introduced :-). There's no way, as far as I'm aware, to elegantly handle configurable files inside the jar, nor to handle writable data inside the webapp jar. One thought though; for web applications you're supposed to get external resources by configuring them in the web.xml and using ServletContext.getResourceAsStream(). This only supports input streams, but I've always sort of felt it should support output streams as well. Or that there should be some similar mechanism, so that at least the point where you're crossing the web application boundary is explicitly and clearly defined in a standard central location for such information. Steven J. Owens puff@darksleep.com "I'm going to make broad, sweeping generalizations and strong, declarative statements, because otherwise I'll be here all night and this document will be four times longer and much less fun to read. Take it all with a grain of salt." - Me at http://darksleep.com --------------------------------------------------------------------- To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: tomcat-user-help@jakarta.apache.org