logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jacob Kjome" <h...@visi.com>
Subject Re: configuring email appending for WARN and above
Date Mon, 16 Aug 2010 18:06:47 GMT
This is documented in the SMTPAppender Javadoc [1].

log4j.appender.email.EvaluatorClass=com.mypackage.MyCustomTriggeringEventEvaluator

...where the latter class implements TriggeringEventEvaluator [2].


[1] 
http://logging.apache.org/log4j/1.2/apidocs/org/apache/log4j/net/SMTPAppender.html
[2] 
http://logging.apache.org/log4j/1.2/apidocs/org/apache/log4j/spi/TriggeringEventEvaluator.html

Jake


On Mon, 16 Aug 2010 12:25:42 -0500
  Curtis Garman <curt.garman@gmail.com> wrote:
> Can someone tell if it is possible to configure the smtp email appender to
> send email for WARN level message and above? I seem to only be able to get
> ERROR level stuff to come back in email form.
> 
> log4j.appender.email=org.apache.log4j.net.SMTPAppender
> log4j.appender.email.SMTPHost=smtp.server
> log4j.appender.email.SMTPDebug=false
> log4j.appender.email.bufferSize=1
> log4j.appender.email.from=from@domain.com
> log4j.appender.email.to=to@domain.com
> log4j.appender.email.subject=subject
> log4j.appender.email.threshold=WARN
> log4j.appender.email.layout=org.apache.log4j.PatternLayout
> log4j.appender.email.layout.ConversionPattern=[%p]
> %d{ISO8601}%n%n%c:%L%n%n%m%n
> 
> -- 
> Curtis


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


Mime
View raw message