Skip to content

Conversation

@dependabot
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Oct 9, 2025

Updated NLog from 5.4.0 to 6.0.5.

Release notes

Sourced from NLog's releases.

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)

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)

6.0.3

  • #​5952 FileTarget - Close old files when reaching OpenFileCacheSize. (@​snakefoot)
  • #​5948 FileTarget - Closing on OpenFileCacheTimeout apply least recently used. (@​snakefoot)
  • #​5947 FileTarget - Improved file-archive exception handling when KeepFileOpen=false. (@​snakefoot)
  • #​5954 ColoredConsoleTarget - Added Words-property for easy highlighting of many words without RegEx. (@​snakefoot)
  • #​5955 LogMessageTemplateFormatter - Also use IValueFormatter for positional templates. (@​snakefoot)
  • #​5953 NLog.Targets.Network - Updated links in README.md for nuget-package. (@​snakefoot)
  • #​5945 NLog.Targets.AtomicFile - Added README.md for nuget-package. (@​snakefoot)
  • #​5940 SplunkTarget - Support SplunkFields-property. (@​snakefoot)

6.0.2

  • #​5930 XmlParser - Handle XML comments after root-end-tag. (@​snakefoot)
  • #​5929 XmlLoggingConfiguration - Improve handling of invalid XML. (@​snakefoot)
  • #​5933 Handle invalid message template when skipping parameters array. (@​snakefoot)
  • #​5915 ReplaceNewLinesLayoutRendererWrapper - Replace more line ending characters. (@​oikku)
  • #​5911 NLog.Targets.GZipFile - Improve support for ArchiveAboveSize. (@​snakefoot)
  • #​5921 FileTarget - Activate legacy ArchiveFileName when ArchiveSuffixFormat contains legacy placeholder. (@​snakefoot)
  • #​5924 AsyncTargetWrapper - Updated FullBatchSizeWriteLimit default value from 5 to 10. (@​snakefoot)
  • #​5937 Mark Assembly loading with RequiresUnreferencedCodeAttribute for AOT. (@​snakefoot)
  • #​5938 Logger - Align WriteToTargets with WriteToTargetsWithSpan. (@​snakefoot)
  • #​5909 ConfigurationItemFactory - Added extension hints for webservice and activityid. (@​snakefoot)
  • #​5918 Log4JXmlTarget - Removed alias NLogViewer as conflicts with other nuget-packages. (@​snakefoot)
  • #​5926 SplunkTarget - NetworkTarget with SplunkLayout. (@​snakefoot)
  • #​5927 GelfLayout - Align with SplunkLayout. (@​snakefoot)
  • #​5913 NLog.Targets.Network - Updated nuget-package README.md. (@​snakefoot)
  • #​5912 NLog.Targets.Trace - Updated nuget-package README.md. (@​snakefoot)
  • #​5919 XML docs for Targets and Layouts with remarks about default value. (@​snakefoot)
  • #​5922 XML docs for LayoutRenderers with remarks about default value. (@​snakefoot)
  • #​5925 XML docs for Target Wrappers with remarks about default value. (@​snakefoot)
  • #​5935 Improve NLog XSD Schema with better handling of typed Layout. (@​snakefoot)
  • #​5923 Updated unit-tests from NET6 to NET8. (@​snakefoot)

6.0.1

Improvements

  • #​5898 Changed ConditionExpression to be nullable by default since no Condition means no filtering. (@​snakefoot)
  • #​5906 Include ConditionExpression in the static type registration. (@​snakefoot)
  • #​5895 Fixed the new XML parser to handle XML comments just before end-tag. (@​snakefoot)
  • #​5905 Fixed the new XML parser to allow InnerText with greater-than characters. (@​snakefoot)
  • #​5891 Updated NLog.Targets.AtomicFile to support net8.0-windows without dependency on Mono.Posix.NETStandard. (@​snakefoot)

6.0

Major changes:

  • Support Ahead-of-Time (AOT) builds without warnings
  • Support Nullable references
  • Support ReadOnlySpan to reduce memory allocations
  • LogFactory supports FlushAsync and IDisposableAsync
  • FileTarget removed support for ConcurrentWrites
  • FileTarget refactored file-archive-logic with ArchiveSuffixFormat

NLog v6 has reduced its footprint by extracting features into separate nuget-packages:

List of all NLog 6.0 Pull Requests

See also List of major changes in NLog v6 for more details.

Thanks to all contributers: @​ana1250, @​Pavan8374, @​smnsht, @​RomanSoloweow, @​wadebaird, @​hangy, @​lavige777, @​jokoyoski, @​saltukkos, @​nih0n, @​michaelplavnik, @​Aaronmsv, @​ShadowDancer, @​Orace, @​tvogel-nid, @​martinzding, @​kurnakovv, @​dance, @​JohnVerheij

6.0.0-rc4

Improvements

  • Mark struct as readonly to allow compiler optimization
  • RegisterObjectTransformation to preserve public properties
  • Log4JXmlEventLayout - Enforce MaxRecursionLimit = 0
  • DatabaseTarget with support for AOT (@​JohnVerheij)
  • DatabaseTarget only assign ConnectionString when specified (@​JohnVerheij)

6.0.0-rc3

Improvements

  • Log4JXmlEventLayout - Fixed IncludeEmptyValue for Parameters

6.0.0-rc2

Improvements

  • Fixed NLog XmlParser to support XML comments within XML processing instructions.
  • NLog.Targets.Network now also supports NET35.
  • Updated structs to be readonly to allow compiler optimizations.
  • Updated interface ILoggingConfigurationElement to support nullable Values.
  • Updated all projects to include <IsAotCompatible>
  • Optimized ConsoleTarget to not use Console.WriteLine, and introduced option ForceWriteLine
  • Added new LogEventInfo constructor that supports ReadOnlySpan<MessageTemplateParameter>
  • Updated NLog.Schema nuget-package to include targets-file to copy NLog.xsd to project-folder.
  • Improved configuration-file loading to advise about NLog nuget-packages for missing types.

6.0.0-rc1

Improvements

  • Updated NLog API with <Nullable>enable</Nullable> and introduced Layout.Empty
  • Marked [RequiredParameter] as obsolete, and replaced with explicit option validation during initialization.
  • Marked LogEventInfo.SequenceID and ${sequenceid} as obsolete, and instead use ${counter:sequence=global}.
  • Added support for params ReadOnlySpan when using C# 13
  • Prioritize generic Logger-methods by marking legacy methods with [OverloadResolutionPriority(-1)] when using C# 13
  • Skip LogEventInfo.Parameters-array-allocation when unable to defer message-template formatting.
  • Renamed ChainsawTarget to Log4JXmlTarget to match Log4JXmlEventLayout
  • Updated NLog.Schema to include intellisense for multiple NLog-assemblies.

Unless something bad is discovered, then this will be the last preview build, before the final release of NLog v6.0

Updated NLog v6.0 release notes: https://nlog-project.org/2025/04/29/nlog-6-0-major-changes.html

6.0.0-preview1

Major Changes

  • Support AOT builds without build warnings.
  • New FileTarget without ConcurrentWrites support, but still support KeepFileOpen (true/false).
  • Moved old FileTarget into the new nuget-package NLog.Targets.ConcurrentFile.
  • Created new nuget-package NLog.Targets.AtomicFile that supports ConcurrentWrites for NET8 on both Windows / Linux.
  • Created new nuget-package NLog.Targets.GZipFile that uses GZipStream for writing directly to compressed files.
  • Moved MailTarget into the new nuget-package NLog.Targets.Mail.
  • Moved NetworkTarget into the new nuget-package NLog.Targets.Network.
  • New GelfTarget introduced for the new nuget-package NLog.Targets.Network.
  • New SyslogTarget introduced for the new nuget-package NLog.Targets.Network.
  • Moved TraceTarget and NLogTraceListener into the new nuget-package NLog.Targets.Trace.
  • Moved WebServiceTarget into the new nuget-package NLog.Targets.WebService
  • Removed dependency on System.Text.RegularExpressions and introduced new nuget-package NLog.RegEx.
  • Removed dependency on System.Xml.XmlReader by implementing own internal basic XML-Parser.

NLog v6.0 release notes: https://nlog-project.org/2025/04/29/nlog-6-0-major-changes.html

List of all NLog 6.0 Pull Requests

Thanks to all contributers: @​ana1250, @​Pavan8374, @​smnsht, @​RomanSoloweow, @​wadebaird, @​hangy, @​lavige777, @​jokoyoski, @​saltukkos, @​nih0n, @​michaelplavnik, @​Aaronmsv, @​ShadowDancer, @​Orace, @​tvogel-nid, @​martinzding, @​kurnakovv

5.5.1

  • #​5858 ConsoleTarget - Added ForceWriteLine to match NLog v6 Schema (@​snakefoot)
  • #​5866 Layout.FromLiteral to match NLog v6 (@​snakefoot)
  • #​5888 ChainsawTarget with type-alias Log4JXml to match NLog v6 (@​snakefoot)
  • #​5883 AsyncTargetWrapper - LogEventDropped and EventQueueGrow events fixes (@​dance)
  • #​5890 StringBuilderExt - Change Append2DigitsZeroPadded to array-lookup (@​snakefoot)
  • #​5936 XmlLayout - Support MaxRecursionLimit == 0 (@​snakefoot)
  • #​5936 RegisterObjectTransformation so build trimming will keep public properties (@​snakefoot)

5.5

Improvements

  • #​5710 Restored LogFactory.Setup().SetupFromEnvironmentVariables() as not obsolete (#​5710) @​snakefoot
  • #​5717 Avoid using MakeGenericType for Dictionary enumeration when AOT (#​5717) @​snakefoot
  • #​5730 Stop using obsolete Assembly.CodeBase for NetStandard (#​5730) @​snakefoot
  • #​5742 ExceptionLayoutRenderer - Handle Exception properties like StackTrace can throw with AOT (#​5742) @​snakefoot
  • #​5743 ExceptionLayoutRenderer - Handle Data-collection-item ToString can throw with AOT (#​5743) @​snakefoot
  • #​5763 ExceptionLayoutRenderer - Handle Exception-properties can throw with AOT (#​5763) @​snakefoot
  • #​5756 ServiceRepository - Improve exception-handling when resolving service-types while disposing (#​5756) @​snakefoot
  • #​5759 LayoutRenderer - Optimize performance by skipping cache result from render Inner Layout (#​5759) @​snakefoot
  • #​5795 ConditionLayoutExpression - Optimize performance by skipping cache result from render Inner Layout (#​5795) @​snakefoot
  • #​5731 Mark IFactory RegisterType as obsolete, since it will be removed with NLog v6 (#​5731) @​snakefoot
  • #​5766 Mark JsonLayout EscapeForwardSlash as obsolete, since disabled with NLog v6 (#​5766) @​snakefoot
  • #​5823 Mark ExceptionLayoutRenderer Formats-List as obsolete, since immutable with NLog v6 (#​5823) @​snakefoot
  • #​5769 Updated API-code examples to not depend on obsolete SimpleConfigurator (#​5769) @​snakefoot
  • #​5776 ObjectReflectionCache - Handle PropertyValue can throw with AOT (#​5776) @​snakefoot
  • #​5780 NetworkTarget - Introduced option NoDelay to disable delayed ACK (#​5780) @​snakefoot
  • #​5788 Fix InternalLogger noise about reflection for FuncLayoutRenderer (#​5788) @​snakefoot
  • #​5792 TargetWithContext - Reduce allocation for RenderLogEvent when SimpleLayout (#​5792) @​snakefoot
  • #​5810 Refactoring to improve null value handling (#​5810) @​snakefoot
  • #​5812 Refactoring to improve null value handling (#​5812) @​snakefoot
  • #​5817 LoggingConfigurationParser - Prioritize LoggingRules from current config (#​5817) @​snakefoot
  • #​5825 WhenEmptyLayoutRendererWrapper - Optimize IStringValueRenderer Logic (#​5825) @​snakefoot

Commits viewable in compare view.

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

---
updated-dependencies:
- dependency-name: NLog
  dependency-version: 6.0.5
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
@dependabot dependabot bot added .NET Pull requests that update .NET code dependencies Pull requests that update a dependency file labels Oct 9, 2025
@dependabot dependabot bot added the .NET Pull requests that update .NET code label Oct 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file .NET Pull requests that update .NET code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant