Ronnie, If you need the SmtpAppender to send an email immediately for each log message that is routed to it you should set the BufferSize to 0. This will mean that each email will contain only 1 log message.
<appender name="Mail" type="log4net.Appender.SmtpAppender"> <bufferSize value="0" /> ... </appender> If you also want to limit the logging events that the appender sends then you need to specify a threshold level on the appender. <threshold value="ERROR" /> Cheers, Nicko > -----Original Message----- > From: Ronnie Hayden [mailto:[EMAIL PROTECTED] > Sent: 27 July 2005 05:27 > To: [email protected] > Subject: Ignoring BufferSize > > i am using an SmtpAppender and require log4net to send emails > of log messages of error-level only. > > setting the BufferSize parameter, sends me the context of the > message (which includes warn,info and debug level messages). > how do i disable the context of a message? that is, i need > only that logged message to be emailed. all other messages > should be ignored. i tried setting BufferSize to 1,0,-1 and > even removing the param node, but it doesn't work! > > any help would be appreciated. > > __________________________________________________ > Do You Yahoo!? > Tired of spam? Yahoo! Mail has the best spam protection > around http://mail.yahoo.com > >
