logging-log4net-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Romil Garg" <Rom...@A-t-g.com>
Subject Performance Issues with SMTP Appender
Date Fri, 15 Feb 2008 15:26:15 GMT
I am using log4net 1.2.10 and have an application which processes around
million records on a daily basis. Recently, I added SMTP appender to it
and the running time of that process increased from 30 minutes to approx
3 hours even though the threshold value was set at WARN and I didn't log
any WARNs at all ever since I added the SMTP appender. 
Removing the SMTP appender brought the running time back to 30 minutes.
Apart from SMTP, we have already been using RollingFile and EventLog
appenders with no apparent performance issues.
Here's the SMTP configuration I am using:
<appender name="SmtpAppender" type="log4net.Appender.SmtpAppender"> 

<to value=myself@123.com />

<from value=${COMPUTERNAME}@123.com <mailto:${COMPUTERNAME}@123.com>  />

<subject value="${COMPUTERNAME} Process ABC Error" />

<smtpHost value="localhost" />

<bufferSize value="50" />

<lossy value="true" /> 

<evaluator type="log4net.Core.LevelEvaluator">

        <threshold value="WARN"/>


<layout type="log4net.Layout.PatternLayout">

        <conversionPattern value="%newline%date [%thread] %-5level
%logger [%property{NDC}] - %message%newline%newline%newline" />




Any suggestions on how to avoid the performance hit and still benefit
from this appender.


View raw message