We are building a continuous integration system and
while the system emails us if there are any failures
on compile , build or deployment, we were not being
notified if an EJB failed to deploy in JBoss.
So this seems like a silly way to get an alert, but we
created an SMTP appender in Log4j, created a logger on
org.jboss.system.ServiceController and created a log4j
trigger as follows:
import org.apache.log4j.spi.TriggeringEventEvaluator;
import org.apache.log4j.spi.LoggingEvent;
public class YesTrigger implements
TriggeringEventEvaluator{
public boolean isTriggeringEvent(LoggingEvent event)
{
return
(event.getRenderedMessage().startsWith("Problem") ||
event.getRenderedMessage().startsWith("Unable"));
}
}
It seems to work for the issues we have had so far. Is
there a cleaner way to do it ?
Thanks.
//Nicholas
=====
Nicholas Whitehead
Home: (973) 377 9335
Cell: (201) 615 2716
[EMAIL PROTECTED]
Get Your News From The Crowbar: http://crowbar.dnsalias.com:443/crowbar/
-------------------------------------------------------
This SF.net email is sponsored by:Crypto Challenge is now open!
Get cracking and register here for some mind boggling fun and
the chance of winning an Apple iPod:
http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0031en
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user