logging-log4net-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nicko Cadell" <ni...@neoworks.com>
Subject RE: SmtpAppender
Date Sun, 26 Mar 2006 23:30:15 GMT
You will have to define 2 separate appenders.

<root>
  <appender-ref name="appender1" />
</root>

<logger name="Log4net.MainForm" additivity="false">
  <appender-ref name="appender2" />
</logger>

The additivity flag on the logger prevents it inheriting the appenders
from the <root>.

Cheers,
Nicko

> -----Original Message-----
> From: Vladimir Kovalenko [mailto:gaset.kovalenko@gmail.com] 
> Sent: 09 March 2006 08:27
> To: log4net-user@logging.apache.org
> Subject: SmtpAppender
> 
> I have SmtpAppender configured to send messages to  
> address1@mail.com. Now I want to configure Log4net.MainForm 
> logger to send messages to address2@mail.com and all the rest 
> loggers to address1@mail.com. Can I do that with configuration file?
> 
>  
> 
> Best Regards,
> 
> Vladimir Kovalenko
> 
> 

Mime
View raw message