Releases: NLog/NLog
Releases · NLog/NLog
Release list
NLog 6.2
Improvements
- #6215 FileTarget - Added FileLifecycleHooks for extending archive logic. (@Dave-Senn)
- #6218 ScopeContext - Optimize collection of properties in reverse order. (@snakefoot)
- #6230 PropertyTypeConverter - Disable legacy TypeDescriptor when AOT. (@snakefoot)
- #6231 Replacing ProcessInfo-LayoutRenderer with ProcessStart-LayoutRenderer. (@snakefoot)
- #6229 GarbageCollectorInfoLayoutRenderer - WorkingSet + Format. (@snakefoot)
- #6246 AsyncTaskTarget - Added Jitter on Retry to reduce thundering herd. (@snakefoot)
- #6248 AsyncTaskTarget - Changed Jitter to use Stopwatch instead of TickCount. (@snakefoot)
- #6245 AsyncTaskTarget - Refactor to reduce code complexity. (@snakefoot)
- #6148 AppEnvironmentWrapper - Return Unknown_ProcessId when empty ProcessName. (@snakefoot)
- #6187 ConfigurationItemFactory - Marked ParseMessageTemplates as obsolete. (@snakefoot)
- #6243 ConditionParser - Marked as obsolete, so it can become internal. (@snakefoot)
- #6087 Target - Reduce code complexity of WriteAsyncLogEvents. (@snakefoot)
- #6200 SimpleLayout - Marked Renderers-property as obsolete. (@snakefoot)
- #6239 LogFactory - FlushAsync and DisposeAsync with explict usage of CancellationToken.None. (@snakefoot)
Release notes for NLog v6.2: https://nlog-project.org/2026/08/16/nlog-6-2-aot-build-size.html
NLog 6.1.4
Improvements
- #6225 AsyncTaskTarget - Fixed bug when using BatchSize=1 and doing explicit flush and next LogEvent fails. (@snakefoot)
- #6206 MruCache - Changed to ConcurrentDictionary but still single writer. (@snakefoot)
- #6205 TargetWithFilterChain - Increase CallSite MaxCapacity from 1000 to 2000. (@snakefoot)
- #6197 JsonAttribute - New constructor with JsonLayout and Encode = false. (@snakefoot)
- #6174 Reduce AOT file-size. Changed PropertyTypeConverter to avoid Dictionary for conversion mapping. (@snakefoot)
- #6177 Reduce AOT file-size. Changed LogFactory PurgeObsoleteLoggers to clone Dictionary instead of ToList. (@snakefoot)
- #6185 Reduce AOT file-size. Changed to use yield instead of Linq. (@snakefoot)
- #6188 Reduce AOT file-size. Changed ConfigurationItemFactory from Dictionary to Array of PropertyInfo. (@snakefoot)
- #6192 Reduce AOT file-size. Changed Target FindAllLayouts to use HashSet instead of Linq Distinct. (@snakefoot)
- #6193 Reduce AOT file-size. Changed XmlLoggingConfiguration AutoReloadFileNames to use yield instead of Linq. (@snakefoot)
- #6195 Reduce AOT file-size. Changed LoggingConfiguration CheckUnusedTargets to use HashSet instead of Linq. (@snakefoot)
- #6204 TemplateEnumerator - Replace LiteralHole with CurrentHole and CurrentLiteral. (@snakefoot)
- #6223 XmlParser - ReadUntilChar avoid extra string-allocation on trim InnerText. (@snakefoot)
- #6222 XmlParser - Simplify ReadUntilChar by extracting parse of attribute-name into ReadEntityName. (@snakefoot)
- #6209 AppVeyor - Visual Studio 2026. (@snakefoot)
- #6199 Fixed nullable warnings from Activator.CreateInstance. (@snakefoot)
- #6190 SetupConfigurationTargetBuilder - Fix Sonar Code Smell. (@snakefoot)
- #6176 TryNLogSpecificConversion - Refactor parsing Layout from string. (@snakefoot)
- #6210 ScopeContext - Fix List capacity for GetAllNestedStates. (@jnyrup)
- #6211 ScopeContext - Renamed PushNestedState to CollectNestedState. (@snakefoot)
- #6214 ScopeContext - Rename CaptureNestedContext to CloneNestedContext. (@snakefoot)
- #6216 ScopeContext - Simplify CaptureContextProperties when only nested state. (@snakefoot)
- #6217 ScopeContext - Unify CollectNestedState implementation. (@snakefoot)
NLog 6.1.3
Improvements
- #6168 PropertiesDictionary - Preserve MessageTemplate property details when adding extra properties. (@snakefoot)
- #6149 LoggingRule - Updating FinalMinLevel should also update MinLevel when same LogLevel. (@snakefoot)
- #6165 AsyncTaskTarget - Retry with help from Task.Delay. (@snakefoot)
- #6164 DateLayoutRenderer - UniversalTime = false should only convert to local when UTC. (@snakefoot)
- #6138 SimpleLayout skip Precalculate when INoAllocationStringValueRenderer available. (@reabr)
- #6158 TemplateEnumerator - Optimize ParseTextPart by direct calling IndexOfAny. (@snakefoot)
- #6152 TemplateEnumerator - Optimize parsing of single digit holename. (@snakefoot)
- #6142 InternalLogger - Skip allocating params array when no exception. (@snakefoot)
- #6145 InternalLogger - Handle Exception ToString can throw with AOT. (@snakefoot)
- #6154 ColoredConsoleTarget - Optimize Console Coloring for Word Highlight. (@snakefoot)
- #6159 ColoredConsoleTarget - Reset capture of previous colors after ResetDefaultColors. (@snakefoot)
- #6140 TryParseEnum - Apply Enum.TryParse since better for AOT. (@snakefoot)
- #6143 Fixed various issues reported by EnableNETAnalyzers. (@snakefoot)
NLog 6.1.2
Improvements
- #6116 PropertyTypeConverter - Prioritize IFormattable ToString when Format specified. (@snakefoot)
- #6129 GZipFile - Support Header / Footer / WriteBom. (@snakefoot)
- #6126 FileTarget - Alert when FileName needs to be repaired. (@snakefoot)
- #6113 FileTarget - Upfront validation of ArchiveSuffixFormat property. (@snakefoot)
- #6110 FileTarget - Improve repair of legacy ArchiveFileName. (@snakefoot)
- #6107 LoggingRule - Added WriteTo-method to match NLog.config. (@snakefoot)
- #6106 LoggingRule - Added MinLevel-property to match NLog.config. (@snakefoot)
- #6118 LoggingRule - Update FinalMinLevel-property to match NLog.config. (@snakefoot)
- #6123 Layout.IsNullOrEmpty similar to string.IsNullOrEmpty. (@snakefoot)
- #6119 TargetPropertyWithContext - Added alias Value for Layout. (@snakefoot)
- #6132 TargetPropertyWithContext - ToString returns Name and Value. (@snakefoot)
- #6105 MessageTemplateParameters - Reduce code complexity. (@snakefoot)
- #6131 + #6133 Refactor NLog source code to fix nullable warnings. (@snakefoot)
NLog 6.1.1
Improvements
- #6101 LogFactory - Flush / FlushAsync asynchronous completion outside Target lock. (@snakefoot)
- #6100 NLog.Targets.AtomicFile supporting NetStandard2 with Win32 API. (@michailf)
- #6094 XmlLayout - Faster XML encoding with INoAllocationStringValueRenderer. (@snakefoot)
- #6091 LiteralWithRawValueLayoutRenderer - Only support RawValue when possible. (@snakefoot)
- #6088 CachedLayoutRendererWrapper - Allow literal optimization when caching not needed. (@snakefoot)
NLog 6.1
Improvements
- #5999 JsonLayout - Added support for DottedRecursion. (@thatrajeevkr)
- #6084 JsonLayout - Protect against cyclic object graphs when DottedRecursion. (@snakefoot)
- #6075 DebuggerTarget - Add support for MaxMessageSize and OnOverflow-action. (@snakefoot)
- #6070 InternalLogger - Auto enable LogLevel.Info when activated. (@snakefoot)
- #6045 LoggingConfigurationParser - Report unrecognized options in targets and rules section. (@snakefoot)
- #6059 LogEventBuilder - Properties with IReadOnlyCollection for initialCapacity. (@snakefoot)
- #6065 FileTarget - Adjust ArchiveSuffixFormat to better handle legacy ArchiveFileName. (@snakefoot)
- #6079 FileTarget - Replace Environment.TickCount with LogEventInfo.TimeStamp. (@snakefoot)
- #6066 FileTarget - Simplify FileName natural ordering logic. (@snakefoot)
- #6069 FileTarget - Reduce code complexity for NaturalStringComparer. (@snakefoot)
- #6064 FileTarget - Reduce code complexity for ArchiveNumbering property. (@snakefoot)
- #6082 JsonLayout - Faster Json encoding with INoAllocationStringValueRenderer. (@snakefoot)
- #6083 CsvLayout - Faster CSV encoding with INoAllocationStringValueRenderer. (@snakefoot)
- #6081 DefaultJsonSerializer - Reduce overhead of PerformJsonEscapeWhenNeeded. (@snakefoot)
- #6025 LogEventInfo - Changed LayoutCache from dictionary to linked list. (@snakefoot)
- #6049 PropertiesDictionary - Increase initial capacity when insert. (@snakefoot)
- #6061 PropertiesDictionary - Simplify enumerator when mixing property types. (@snakefoot)
- #6074 WhenEmpty - Optimize when IsFixedText. (@snakefoot)
- #6062 BufferingTargetWrapper - Improve InternalLogger output when WrappedTarget is NULL. (@snakefoot)
- #6067 Fix nullable warnings from NET10 annotations. (@snakefoot)
- #6068 Support nullable where TKey : notnull for dictionary. (@snakefoot)
- #6071 AssemblyExtensionTypes - Reduce code complexity. (@snakefoot)
- #6072 LoggingConfigurationFileLoader - Handle unknown type loading for App.config. (@snakefoot)
- #6076 Marked ConversionHelpers.TryParseEnum as obsolete. (@snakefoot)
- #5949 CallSiteLayoutRenderer - Obsoleted CleanNamesOfAnonymousDelegates + CleanNamesOfAsyncContinuation. (@snakefoot)
NLog 6.0.7
Improvements
- #6056 FileTarget - Archive Cleanup sort filenames using natural ordering. (@snakefoot)
- #6054 EventProperties - Format Dictionary Properties correctly. (@snakefoot)
- #6051 Failure to create config item should be reported as InternalLogger Error. (@snakefoot)
- #6052 PropertiesDictionary - Faster TryGetValue without IsEmpty. (@snakefoot)
- #6048 PropertiesDictionary - Increase initial capacity when insert. (@snakefoot)
- #6047 LogEventInfo - Minor optimization of HasImmutableProperties. (@snakefoot)
- #6057 WhenEmpty - Support AppDomainFixedOutput optimization. (@snakefoot)
- #6053 JsonAttribute - Reduce code complexity when Encode = false. (@snakefoot)
- #6044 Target also enforce PreventMultipleCalls when WriteFailedNotInitialized. (@snakefoot)
- #6042 NLog.RegEx - Fixed Wiki-link in nuget-package. (@snakefoot)
NLog 6.0.6
Improvements
- #6027 FileTarget - Improve archive cleanup when using ArchiveSuffixFormat with datetime. (@snakefoot)
- #6028 FileTarget - Fix archive cleanup when only single old file and using MaxArchiveDays. (@snakefoot)
- #6039 FileTarget - Render ArchiveSuffixFormat using NLog DefaultCultureInfo. (@snakefoot)
- #6030 ObjectReflectionCache - Improve handling of JObject serialization. (@snakefoot)
- #6026 JsonLayout - Reduce code complexity for rendering JsonAttribute. (@snakefoot)
- #6036 NullTarget - Improve thread concurrency when FormatMessage = false. (@snakefoot)
- #6023 MemoryTarget - Apply MaxLogsCount limit on next LogEvent. (@snakefoot)
- #6040 XmlParser - Refactor to reduce code complexity. (@snakefoot)
- #6041 ScopeContextAsyncState - Refactor to reduce code complexity. (@snakefoot)
NLog 6.0.5
Improvements
- #5998 FileTarget - Rolling to next directory should not fail. (@snakefoot)
- #6013 ValueFormatter - Skip quotes for CaptureType.Stringify unless legacy mode. (@snakefoot)
- #6007 ColoredConsoleTarget - Use Span to reduce string-allocation for word-highlighting. (@snakefoot)
- #6009 NullTarget - Avoid string-allocation upfront when FormatMessage = true. (@snakefoot)
- #6012 XmlLoggingConfiguration - Reduce output for InternalLogger Info-Level. (@snakefoot)
- #6006 XmlLoggingConfiguration - Protect against double dispose of AutoReloadConfigFileWatcher. (@snakefoot)
- #6008 LoggerImpl - Merge WriteToTargetWithFilterChain into Write. (@snakefoot)
- #6010 LoggingConfiguration - Redirect AddRuleForOneLevel and AddRuleForAllLevels to AddRule. (@snakefoot)
- #6011 LoggingRule - Align EnableLoggingForLevels to skip when minLevel is LogLevel.Off. (@snakefoot)
- #6015 CompoundLayout - Changed to foreach for better release optimizations. (@snakefoot)
- #6016 CsvLayout - Changed to foreach for better release optimizations. (@snakefoot)
- #6017 JsonArrayLayout - Changed to foreach for better release optimizations. (@snakefoot)
- #6018 XmlLayout - Changed to foreach for better release optimizations. (@snakefoot)
NLog 6.0.4
Improvements
- #5979 FileTarget - Improve file-wildcard for archive cleanup. (@snakefoot)
- #5980 FileTarget - Extend InternalLogger output with archive cleanup reason. (@snakefoot)
- #5981 FileTarget - Strict wildcard check only possible when single wildcard. (@snakefoot)
- #5987 FileTarget - Improve archive cleanup with dynamic seq-no. (@snakefoot)
- #5988 FileTarget - Avoid parsing archive sequence number when other digits. (@snakefoot)
- #5996 FileTarget - Improve fallback logic when missing file system birthtime. (@snakefoot)
- #5964 ColoredConsoleTarget - WholeWords should only highlight the word. (@snakefoot)
- #5967 ColoredConsoleTarget - Fixed boxing issue in ConsoleRowHighlightingRule. (@karpinsn)
- #5968 Simplify WithAutoFlush-method for fluent config API. (@snakefoot)
- #5970 Fix boxing for registration of builtin condition methods. (@snakefoot)
- #5977 ConditionExpression - Implicit operator with NotNullIfNotNull-attribute. (@GREsau)
- #5982 SimpleLayout - Implicit operator with NotNullIfNotNull-attribute. (@snakefoot)
- #5992 MessageLayoutRenderer - Handle Exception.ToString() can throw with AOT. (@snakefoot)
- #5983 Append4DigitsZeroPadded - Use Span instead of multiple StringBuilder.Append(). (@snakefoot)
- #5985 Extracted NLog.WindowsRegistry to own git repository. (@snakefoot)
- #5985 Extracted NLog.Targets.Trace to own git repository. (@snakefoot)
- #5985 Extracted NLog.Targets.ConcurrentFile to own git repository. (@snakefoot)
- #5985 Extracted NLog.Targets.Database to own git repository. (@snakefoot)
- #5985 Extracted NLog.Targets.Mail to own git repository. (@snakefoot)
- #5985 Extracted NLog.Targets.WebService to own git repository. (@snakefoot)
- #5985 Extracted NLog.Targets.Network to own git repository. (@snakefoot)