You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-user@logging.apache.org by Bruno Melloni <Br...@akuratus.com> on 2005/04/29 15:38:40 UTC
Small email on error or above
This need is probably very simple, well known and solved a long time
ago:
I'd like to send a tiny "<myAppName>: Error DD/MM/YY HH:MM:SS" to an
email address (or list of addresses) read from a configuration file
(could even be in log4j.xml). I only want to send it when the severity
is Error or higher. I don't want to send the full error message, just a
short string so that the email can be routed through SMS to the support
administrators cell phone messaging.
I know I could extend Logger and use the new class instead of Logger.
But I suspect someone has already solved this, maybe through an
appender.
So here comes the obvious question: what is the best approach to solve
this need?
Thanks
Bruno Melloni
Director of Software Architecture
Akuratus Corporation
1333 N. Stemmons Fwy, Suite 110
Dallas, Texas 75207
Phone: 469.227.0920
Fax: 469.227.0967
bruno.melloni@akuratus.com
www.akuratus.com
---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org
Re: Small email on error or above
Posted by James Stauffer <st...@gmail.com>.
You could use an SMTPAppender with a threshold of error and the
following for the conversion string:
MyApp Err %d{ISO8601}
Change the date format to fit your needs.
On 4/29/05, Bruno Melloni <Br...@akuratus.com> wrote:
> This need is probably very simple, well known and solved a long time
> ago:
>
> I'd like to send a tiny "<myAppName>: Error DD/MM/YY HH:MM:SS" to an
> email address (or list of addresses) read from a configuration file
> (could even be in log4j.xml). I only want to send it when the severity
> is Error or higher. I don't want to send the full error message, just a
> short string so that the email can be routed through SMS to the support
> administrators cell phone messaging.
>
> I know I could extend Logger and use the new class instead of Logger.
> But I suspect someone has already solved this, maybe through an
> appender.
>
> So here comes the obvious question: what is the best approach to solve
> this need?
>
> Thanks
>
> Bruno Melloni
> Director of Software Architecture
> Akuratus Corporation
> 1333 N. Stemmons Fwy, Suite 110
> Dallas, Texas 75207
> Phone: 469.227.0920
> Fax: 469.227.0967
> bruno.melloni@akuratus.com
> www.akuratus.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-user-help@logging.apache.org
>
>
--
James Stauffer
Are you good? Take the test at http://www.livingwaters.com/good/
---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org