tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vano Beridze <vano.beri...@silkroad.ge>
Subject log listener
Date Thu, 13 Feb 2003 20:14:40 GMT

Hello 

I'have the following scenario

I've got a web application that logs it's output using 
standard tomcat mechanisms

excerpt from server.xml

....
 <Context path="/srm" docBase="/home/vanob/projects/SRM" debug="0"
            reloadable="true" crossContext="true">
            <Logger className="org.apache.catalina.logger.FileLogger"
                    prefix="localhost_srm_log." suffix=".txt"
timestamp="true"/>
            <Resource name="mail/Session" auth="Container"
                    type="javax.mail.Session"/>
          <ResourceParams name="mail/Session">
            <parameter>
              <name>mail.smtp.host</name>
              <value>mail.silkroad.ge</value>
            </parameter>
          </ResourceParams>        
        </Context>
....


I would like to intercept all exceptions logged in a logfile
and send mail to my email address.
what is the best wat to achieve this?
thanks

P.S. from my application I have centralized mechanism of logging events
(I have LogMan class). So it's not the problem to solve the problem by
sending mail from this class, but there are still cases, for example
NPE-s that are logged by tomcat and I want to be able to have control on
this events also
-- 
Vano Beridze <vano.beridze@silkroad.ge>
Silkroad Corporation S.A.


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Mime
View raw message