logging-log4net-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mohkam Singh Sawhney <singh...@yahoo.com>
Subject Log4Net v2.0.8 - SMTP appender not relaying emails on Windows Server 2003
Date Sun, 12 Nov 2017 10:36:43 GMT
We were using Log4Net v1.2.13.0 with an application that targets .net framework 4 on windows
server 2003, Below is the SmptAppender configuration (hiding our production values with xxxx).
We were able to receive email on 'FATAL' log entry.
    <appender name="SmtpAppender" type="log4net.Appender.SmtpAppender">      <to
value="xxxx" />      <from value="xxxx" />      <subject type="log4net.Util.PatternString"
value="xxxx" />      <smtpHost value="xxxx" />      <username value="xxxx"
/>      <password value="xxxx" />      <authentication value="Basic" /><bufferSize
value="5" /><lossy value="true" /><evaluator type="log4net.Core.LevelEvaluator"> 
      <threshold value="FATAL" />      </evaluator><layout type="log4net.Layout.PatternLayout"> 
      <conversionPattern value="%newline%date %-5level [%logger] %message%newline%exception%newline"
/>      </layout>    </appender>
We recently updated our application to use Log4Net v2.0.8, with the same configuration for
SmptAppender . After this update, we stopped receiving emails. On enabling the internal log4Net
logging, the below error was logged.
log4net: Created Appender [SmtpAppender]log4net: Adding appender named [SmtpAppender] to logger
[root].log4net: Hierarchy Threshold []log4net:ERROR [SmtpAppender] ErrorCode: GenericFailure.
Failed in DoAppendSystem.TypeLoadException: Could not load type 'System.Security.Claims.ClaimsIdentity'
from assembly 'mscorlib, Version=, Culture=neutral, PublicKeyToken=b77a5c561934e089'. 
 at log4net.Core.LoggingEvent.get_UserName()   at log4net.Core.LoggingEvent.FixVolatileData(FixFlags
flags) in c:\log4net\tags\2.0.8RC1\src\Core\LoggingEvent.cs:line 1341   at log4net.Appender.BufferingAppenderSkeleton.Append(LoggingEvent
loggingEvent) in c:\log4net\tags\2.0.8RC1\src\Appender\BufferingAppenderSkeleton.cs:line 483 
 at log4net.Appender.AppenderSkeleton.DoAppend(LoggingEvent loggingEvent) in c:\log4net\tags\2.0.8RC1\src\Appender\AppenderSkeleton.cs:line
317log4net: Shutdown called on Hierarchy [log4net-default-repository]
If we revert back to Log4Net v1.2.13.0, we start receiving emails as expected. Please advise
how can we resolve the issue with version 2.0.8.

Thanks and Regards
Mohkam Singh

View raw message