3.0.0
Apache log4net 3.0.0 addresses the following issues:
Breaking Changes
Framework Support
Attention: Starting with 3.0.0 we only support the following target frameworks
- net462
- netstandard2.0
The reasoning for this change can be found in #111
Deleted obsolete API (#125)
- obsolete since 1.2.14 - 2015
-
log4net.Appender.BufferingAppenderSkeleton.OnlyFixPartialEventData
andlog4net.Appender.MemoryAppender.OnlyFixPartialEventData
(you will need to change your config files fromonlyFixPartialEventData value="true"
tofix value="Partial"
) -
log4net.Appender.ColoredConsoleAppender.ctor(ILayout)
-
log4net.Appender.ColoredConsoleAppender.ctor(ILayout, bool)
-
log4net.Appender.ConsoleAppender.ctor(ILayout)
-
log4net.Appender.ConsoleAppender.ctor(ILayout, bool)
-
log4net.Appender.DebugAppender.ctor(ILayout)
-
log4net.Appender.EventLogAppender.ctor(ILayout)
-
log4net.Appender.FileAppender.ctor(ILayout, string)
-
log4net.Appender.FileAppender.ctor(ILayout, string, bool)
-
log4net.Appender.SmtpAppender.LocationInfo
-
log4net.Appender.TextWriterAppender.ctor(ILayout, Stream)
-
log4net.Appender.TextWriterAppender.ctor(ILayout, TextWriter)
-
log4net.Appender.TraceAppender.ctor(ILayout)
-
log4net.Config.DOMConfigurator
-
log4net.Config.AliasDomainAttribute
-
log4net.Config.DomainAttribute
-
log4net.Config.DOMConfiguratorAttribute
-
log4net.Core.LoggerManager.GetLoggerRepository
-
log4net.Core.LoggerManager.CreateDomain
-
log4net.Core.LoggingEventData.TimeStamp
-
log4net.Core.LoggingEvent.GetExceptionStrRep
-
log4net.Core.LoggingEvent.FixVolatileData
-
log4net.LogManager.GetLoggerRepository
-
log4net.LogManager.CreateDomain
-
- obsolete since 2.0.6 - 2016
log4net.Util.SystemInfo.ProcessStartTime
Other changes
- dropped
log4net.Appender.RemotingAppender
(see #154 - Remove RemotingAppender) - dropped
log4net.Appender.NetSendAppender
(see #158 - NetSendAppender removed) - dropped support for legacy serialization for .netstandard (see #174 and #175)
log4net.Config.AliasRepositoryAttribute
is now sealed (#124)log4net.Config.RepositoryAttribute
is now sealed (#124)log4net.Config.XmlConfiguratorAttribute
is now sealed (#124)- interface
log4net.Appender.AppenderCollection.IAppenderCollectionEnumerator
is now obsolete and must be replaced byIEnumerator<IAppender>
(#124) log4net.Appender.MemoryAppender.m_eventsList
(protected field) was changed fromArrayList
toList<LoggingEvent>
(#124)- for getting
m_eventsList.SyncRoot
you need to cast it:((ICollection)m_eventsList).SyncRoot
- for getting
log4net.Repository.Hierarchy.Hierarchy.EmittedNoAppenderWarning
is now internal (see #157)
Bugs
- Regression: Creating nested loggers in reverse order fails in 3.0.0-preview.1 (#156 by @FreeAndNil)
- System.NullReferenceException when comparing with a null Level (#169 by @FreeAndNil)
- ColoredConsoleAppender writes UTF-8 preamble to the console on initialization (#168 reported by @RoboBurned, fixed by @FreeAndNil)
- Culture-Specific String Comparisons Cause RollingFileAppender Failure in log4net on NET 5+ (#177 reported by @stianeklund)
Enhancements
- #111 (by @fluffynuts and @FreeAndNil)
- #124 (by @erikmav)
- #125 (by @erikmav)
- #127 (by @FreeAndNil)
- #109 (by @mobilebilly)
New Contributors
- @DanAtkinson made their first contribution in #133
- @mobilebilly made their first contribution in #164
A big thanks to @erikmav for the hard work regarding nullable annotations and moving to generic collections.
Full Changelog: rel/2.0.17...rel/3.0.0
Nuget: https://www.nuget.org/packages/log4net/3.0.0