I believe it's the tomcat or servlet log.
I ended up creating my own log so I could
isolate my info from tomcat.
-Original Message-
From: Ramkumar Manoharan [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, December 27, 2000 8:06 PM
To: [EMAIL PROTECTED]
Subject: RE: printing error messages to log files
Thanks again Tim.I looked at the javadoc and found the methods you were
referring to,but how do you define the "servlet log".Iam puzzled.Is it the
log file located on the tomcat server or can i define a log file on my own?
Ram
From: Tim Cronin [EMAIL PROTECTED]
Reply-To: [EMAIL PROTECTED]
To: "'[EMAIL PROTECTED]'" [EMAIL PROTECTED]
Subject: RE: printing error messages to log files
Date: Wed, 27 Dec 2000 19:51:34 -0600
see the javadoc for javax.servlet.ServletContext.log
there are two flavors one takes a String the
other takes a String and an Exception
for the other hack
(very sudo)
import java.io.File;
import java.io.FileOutputStream;
import java.io.PrintStream;
FileOutputStream fout = new FileOutputStream(new File("logFile.txt"));
System.setOut(new PrintStream(fout));
you could also do this the System.err as well this
way you can isolate your audit statements from
your error statements.
-Original Message-
From: Ramkumar Manoharan [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, December 27, 2000 7:38 PM
To: [EMAIL PROTECTED]
Subject: RE: printing error messages to log files
Thanks tim for a quick reply.Can u show me a sample code or point me to
some
reference/tutorials that illustrates both of your suggestions.
If i can see how it's done,it would help me a lot.
Thanks
Ram
From: Tim Cronin [EMAIL PROTECTED]
Reply-To: [EMAIL PROTECTED]
To: "'[EMAIL PROTECTED]'" [EMAIL PROTECTED]
Subject: RE: printing error messages to log files
Date: Wed, 27 Dec 2000 19:26:59 -0600
see javax.servlet.ServletContext.log
or another simple hack if you got alot of system.out.prinln's in your
code
is to set system.out to a fileOutputStream.
-Original Message-
From: Ramkumar Manoharan [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, December 27, 2000 6:21 PM
To: [EMAIL PROTECTED]
Subject: printing error messages to log files
Hi,
Can anybody help me out on this?I want the error messages to be
logged,but
i
don't see anything given in the doc.when i try to print the error
messages
with system.out.print it gets printed onto the console window.Any help
would
be appreciated.
Thanks
Ram
_
Get your FREE download of MSN Explorer at http://explorer.msn.com
_
Get your FREE download of MSN Explorer at http://explorer.msn.com
_
Get your FREE download of MSN Explorer at http://explorer.msn.com