tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chris Howard" <chow...@asgna.com>
Subject Re: Writing exception trace to a file
Date Tue, 02 May 2000 15:29:44 GMT
> To avoid inadvertent requests of your trace logs, one option would be to
store
> the trace file under the "WEB-INF" directory, which the servlet container
is
> expressly prohibited from serving via requests.  You could do something
like
> this:
>
>     String tracePathname =
> getServletContext().getRealPath("/WEB-INF/tracefile.txt");
>     PrintWriter traceWriter = new PrintWriter(new
FileWriter(tracePathname));
>     traceWriter.println(...);

I like this idea but the problem I have is that I will have multiple
instances of the jsp app running from multiple directories.  I would like 1
log file for each instance.  Maybe I could tack on some directory
information to the log file name.

Thanks again,
Chris


Mime
View raw message