Details
Description
I have a .netcore 3.1 console app which works correctly with log4net 2.0.8. After upgrading this package https://www.nuget.org/packages/Microsoft.Extensions.Logging.Log4Net.AspNetCore/ to latest version I also had to upgrade to log4net 2.0.10. After that upgrade I started getting errors:
2020-09-28 15:17:24,191 [ERROR] MyProject.ElasticsearchAppenderBase - System.PlatformNotSupportedException: Windows Principal functionality is not supported on this platform.
at System.Security.Principal.WindowsIdentity.GetCurrent()
at log4net.Core.LoggingEvent.get_UserName()
at log4net.Core.LoggingEvent.FixVolatileData(FixFlags flags)
at log4net.Core.LoggingEvent.set_Fix(FixFlags value)
at log4net.Appender.BufferingAppenderSkeleton.Append(LoggingEvent loggingEvent)
at MyProject.ElasticsearchAppenderBase.Append(LoggingEvent loggingEvent) in /home/MyProject/Common/SharedPublic/Logging/Elasticsearch/ElasticsearchAppenderBase.cs:line 87
The same error occurs with log4net version 2.0.11.
The ElasticsearchAppenderBase is my custom class built on top of BufferingAppenderSkeleton.
Attachments
Issue Links
- is a clone of
-
LOG4NET-652 Pattern with context property causes PlatformNotSupportedException on Linux
- Resolved