Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Servlet logging problem

Status
Not open for further replies.

MarkShark

Programmer
Aug 22, 2001
36
US
I can't get any of the problems with my servlets to save to servlet.log. I'm using Tomcat as my servlet engine.

I tried this one and it didn't work, any ideas as to why?


}
catch (Exception xcp) {
xcp.printStackTrace();
log(xcp.toString());
}
}

I have also tried this one with different variations without sucess. When I compile it always asks for
")" etc..:

Log(Exception, String)

and

Log(String message, Throwable throwable)

I really need a good working version that will log my errors. Thanks.
 
What is not working? What are the exact Compilation/Runtime errors (we need stacktraces)? What is the exact syntax you used with the other Log attempts? Wushutwist
 
The scripts compile just fine, but one of my Servlets will not call up my XML's and goes to a white screen. JavaConsole doesn't show anything and my servlet.log file only shows each servlet initializing and shows no errors at all from the thrown exceptions.

The other ones I used were:

log(String e, Throwable rootCause);

log(String message, Throwable throwable)

FileWrite fw = new FileWriter("servlet.log");
fw.write(logStr, 0, logStr.length());

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top