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:
The closet thing I found is: http://www.ondotnet.com/pub/a/dotnet...et.html?page=3Code:<appender name="SmtpAppender" type="log4net.Appender.SmtpAppender"> <to value="xxx@xxx.com" /> <from value="xxx@xxx.com" /> <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>
But, that's adding a new appender altogether, not re-configuring existing appenders. I need to change to/from email address. Thanks in advance.


Reply With Quote
Bookmarks