I implemented a class that extends org.apache.catalina.Logger that handles emailing log requests to a given recipient (those which are errors anyhow). Here is my entry in server.xml:
<Logger className="org.md.catalina.logger.TomcatLogger" smtp="mail.attbi.com" email="[EMAIL PROTECTED]"/> I attached the small jar file as well which I put in jakarta-tomcat/server/lib (more on that later) Unfortunately, this doesn't work. Currently, the only place that I could copy this jar file to is jakarta-tomcat/server/lib directory. All other places that I tried it to copy it, the server would complain during startup that it couldn't find the necessary classes. I see messages stating it is interacting with the class. It does print: setting smtp setting email But, it only calls this method public void log(String msg); For some reason it won't call any of the other methods. I see no error messages and for whatever reason, it seems to have stopped the FileLogger from logging anything. So, I'm obviously doing something wrong :) Any help would be appreciated. In the mean time, I'll keep digging... Thanks, Chris On Sat, 2003-03-08 at 21:17, Chris Gokey wrote: > Is there alternatives to the FileLogger class? > <!-- Global logger unless overridden at lower levels --> > <Logger className="org.apache.catalina.logger.FileLogger" > prefix="catalina_log." suffix=".txt" > timestamp="true"/> > > I'd like intercept any errors in Tomcat and mail these errors to a > particular person. > > If not, can I add another Logger by specifying an entry like the above > in the server.xml and creating my custom Logger class? Is that all > that is necessary? > > Thanks, > Chris -- Christopher D. Gokey, SSAI, NASA/GCMD 18 Martin Road, Shelburne Falls, MA 01370 Phone: Voice (413) 625-8129 / FAX 208-248-9055 [EMAIL PROTECTED] AOL: chrisgokey
tomcat_logger.jar
Description: Zip archive
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
