logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jim Moore <jim.mo...@veritas.com>
Subject RE: Appender that sends a mail
Date Wed, 13 Jun 2001 14:46:57 GMT
log4j.appender.A3.EvaluatorClass=MyTriggeringEventEvaluator

public class MyTriggeringEventEvaluator implements TriggeringEventEvaluator
{
  /**
   * Is this the triggering event?
   */
  public boolean isTriggeringEvent(LoggingEvent event) {
    // whatever criteria you want
    if (event == null) {
      return false;
    }
    else {
      return event.priority.isGreaterOrEqual(Priority.ERROR);
    }
  }
}


Does it hang simply because of adding to A3's buffer, or when it tries to
actually send the email?

-Jim Moore


-----Original Message-----
From: Scheil, Sven [mailto:sscheil@cargosoft.de]
Sent: Wednesday, June 13, 2001 9:58 AM
To: 'LOG4J Users Mailing List'
Subject: AW: Appender that sends a mail


I'am trying org.apache.log4j.net.SMTPAppender as the 3rd appender in my
log4j conf file. But every time appending the SMTPAppender my application
consiting of jsp/beans and servlet hangs up. I have no idea? 

The log4j.jar is in the web servers classpath.

I've appended my log4j config file.

2nd Question: What do I have to do in detail to change the triggering event?

Regards sven


log4j.rootCategory=DEBUG, A1, A2, A3

# A1 is set to be a FileAppender which outputs to System.out. 
log4j.appender.A1=org.apache.log4j.FileAppender
log4j.appender.A1.File=System.out

# A1 uses PatternLayout.
log4j.appender.A1.layout=org.apache.log4j.PatternLayout

# The conversion pattern uses format specifiers. You might want to
# change the pattern an watch the output layout change.
log4j.appender.A1.layout.ConversionPattern=%d{dd MMM yyyy HH:mm:ss} %-5p
[%t] %37c %3x %l - %m%n


# A2 is set to be a FileAppender which outputs to System.out. 
log4j.appender.A2=org.apache.log4j.FileAppender
log4j.appender.A2.File=/usr1/kunden/eva_mp/Web-inf/Log/EVAapp_mp.log
#log4j.appender.A2.File=EVAapp_mp.log

# A2 uses PatternLayout.
log4j.appender.A2.layout=org.apache.log4j.PatternLayout

# The conversion pattern uses format specifiers. You might want to
# change the pattern an watch the output layout change.
log4j.appender.A2.layout.ConversionPattern=%d{dd MMM yyyy HH:mm:ss} %-5p
[%t] %37c %3x %l - %m%n


# A3 is set to be a SMTPAppender which outputs to mail
log4j.appender.A3=org.apache.log4j.net.SMTPAppender
log4j.appender.A3.To=sscheil@cargosoft.de
log4j.appender.A3.From=sscheil@cargosoft.de
log4j.appender.A3.Subject=EVA Fehler 
log4j.appender.A3.SMTPHost=194.164.4.244
#log4j.appender.A3.BufferSize=100
#log4j.appender.A3.EvaluatorClass 

# A3 uses PatternLayout.
#log4j.appender.A3.layout=org.apache.log4j.PatternLayout

# The conversion pattern uses format specifiers. You might want to
# change the pattern an watch the output layout change.
#log4j.appender.A3.layout.ConversionPattern=%d{dd MMM yyyy HH:mm:ss} %-5p
[%t] %37c %3x %l - %m%n






> -----Urspr√ľngliche Nachricht-----
> Von: Jim Moore [mailto:jim.moore@veritas.com]
> Gesendet am: Mittwoch, 13. Juni 2001 15:04
> An: 'LOG4J Users Mailing List'
> Betreff: RE: Appender that sends a mail
> 
> org.apache.log4j.net.SMTPAppender
> 
> By default it sends it on ERROR or above, but you can change 
> the trigger to
> FATAL if you want.
> 
> -Jim Moore
> 
> -----Original Message-----
> From: Scheil, Sven [mailto:sscheil@cargosoft.de]
> Sent: Wednesday, June 13, 2001 8:40 AM
> To: 'LOG4J Users Mailing List'
> Subject: Appender that sends a mail
> 
> 
> Hi!
> 
> I'm looking for an appender that sends me a mail when a fatal error is
> logged. Is such an appender existing?
> 
> Regards
> Sven
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: log4j-user-help@jakarta.apache.org
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: log4j-user-help@jakarta.apache.org
> 

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

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


Mime
View raw message