On Fri, 2003-02-14 at 09:57, Shapira, Yoav wrote:
> Howdy,
> 
> OK.  I actually went and looked at the Swatch page out of interest.
> Cool tool.

Yes it is. I use it on my Apache error logs and to security checks on
the access_logs. Easy to setup to boot.

> Here's an approach that may work for you: use log4j.  Implement a
> TriggeringEventEvaluator
> (http://jakarta.apache.org/log4j/docs/api/org/apache/log4j/spi/Triggerin
> gEventEvaluator.html) to do the regex or whatever rules you want to
> decide required a page from a log message.  The evaluator will get every
> log message, including its complete stack trace and any details you want
> to add.  You can use log4j's MDC
> (http://jakarta.apache.org/log4j/docs/api/org/apache/log4j/MDC.html) to
> provide any details needed in order to decide whether the event merits a
> message to your page or not.
> 
> Log4j comes with an SMTP appender that sends email and has all the logic
> you want: throttling and arbitrary rules for even evaluation.  See
> http://jakarta.apache.org/log4j/docs/api/org/apache/log4j/net/SMTPAppend
> er.html for details.

Some more information about myself: I am a system administrator. The
extent of my programmin g experience ends at "Perl for System
Administrators". So I have a questions that may sound dumb:

Can you use these appenders as part of catching exceptions from within
the Code? That is, if you catch a certain exception that is going to be
logged, you set isTriggeringEvent on it and Log4J can then do what needs
to be done? 

> Log4j doesn't come with a pager appender right now.  You could use a JMS
> appender to send events (that pass the triggering event evaluator's
> criteria) to a JMS server somewhere, as there are J2EE servers that can
> handle paging.  Alternatively, you can write the pager appender yourself
> and maybe even donate it to us as a log4j contribution ;)  

Using the SMTPAppender to email it my pager would be plenty.

> This may seem like a lot, but it's really more work explaining the
> process than doing it ;)

If I understand it right, you are right. This would be easily added to
our existing exception handling.

Thanks for the info!

Ben Ricker

-- 
Ben Ricker <[EMAIL PROTECTED]>
Wellinx.com


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to