|
-
April 14th, 2005, 09:08 PM
#1
log4net - configure existing appender programmatically.
Hi, I have added an SMTP appender to my application using Log4Net for logging and notification - but how do you change pre-configured value (in App.Config)? Here's appender section in my configuration file:
Code:
<appender name="SmtpAppender" type="log4net.Appender.SmtpAppender">
<to value="[email protected]" />
<from value="[email protected]" />
<subject value="xxx" />
<smtpHost value="localhost" />
<bufferSize value="512" />
<lossy value="true" />
<evaluator type="log4net.Core.LevelEvaluator">
<threshold value="WARN"/>
</evaluator>
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="%newline%date [%thread] %-5level %logger [%ndc] - %message%newline%newline%newline" />
</layout>
</appender>
The closet thing I found is: http://www.ondotnet.com/pub/a/dotnet...et.html?page=3
But, that's adding a new appender altogether, not re-configuring existing appenders. I need to change to/from email address. Thanks in advance.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|