On Tue, 25 Mar 2003, Chris Gokey wrote:
> Date: 25 Mar 2003 21:47:43 -0500 > From: Chris Gokey <[EMAIL PROTECTED]> > Reply-To: Tomcat Users List <[EMAIL PROTECTED]> > To: Tomcat Users List <[EMAIL PROTECTED]> > Subject: Re: SMTP Logger > > Hi everyone, > > Back to this again.. Any help would be very appreciated. > > I'd created a custom logger that will email errors rather than log them > to a file system. > > Unfortunately, if I add another <Logger className="..."> declaration to > server.xml, it will not use the existing Logger (FileLogger). How can I > make it use both? > You can't do this directly -- there is at most one Logger element per Engine/Host/Context element. > Optionally, I thought of extends the FileLogger, but it is declared > final, so this won't work. > > How should I approach this? Or maybe there is some class already part > of Tomcat that can do what I'm looking for? > You've got two basic choices: * Cut-n-paste the logic of FileLogger into your own SMTPLogger (and then add the email stuff) * Have your SMTPLogger create its own instance of FileLogger, and delegate the log calls to that after sending the emails. > I'm using Tomcat 4.03 under Redhat 8. > > Thanks in advance. > Chris Craig --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
