This is not possible using the built-in SmtpAppender. The appender is designed to be able to log several events in a single email and therefore does not know which logging event to use to render the subject line, therefore the subject line is a static string.
There is an example of how to write a single SMTP appender that sends an email per event and it does set the subject using a PatternLayout. The example is in CVS and you can view it at: http://cvs.apache.org/viewcvs.cgi/logging-log4net/examples/net/1.0/Appenders/SampleAppendersApp/cs/src/Appender/SimpleSmtpAppender.cs?rev=1.1&view=auto Cheers, Nicko > -----Original Message----- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > Sent: 29 November 2004 11:02 > To: [email protected] > Subject: Can I use PatternLayout for Subject in SMTPAppender? > > I want to put the level of the error > in to the Subject of the email message > which SMTPAppender is sending, like: > <param name="Subject" value="Logging - > %p" /> > > Is this possible, and then how? > > > ------------------------------------------------------- > �etta skeyti er sent me� vefposti isl.is > > > >
