logging-log4net-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Petite Escalope <miniscal...@gmail.com>
Subject Customized mail subject fo SmtpAppender
Date Mon, 07 Dec 2009 19:12:21 GMT
Hello,
I am using log4net for a web project and would like to make customized mail
subjects my email appender. I already tried something like :

*          <subject type="log4net.Util.PatternString" value="CovCake LOG
INFO : %property{mailsubject}" />*

* public static void MailInfo(string msg, string subjectDetails)*

*            {*
*                log4net.ThreadContext.Properties["mailsubject"] =
subjectDetails;*
*                Log.Mail.Info(msg);*
*                log4net.ThreadContext.Properties.Clear();*
*            }*
*
*
But it renders CovCake LOG INFO : (null).
*
*
Is there a way to customize mail subject natively (i mean without overriding
existing classes or extending the SmtpAppender)?
*
*
*T*hank you very much. Sorry for my english.

Best *regards*

Mime
View raw message