Skip to content

Commit 10aa5b7

Browse files
committed
NLog v6 - Rc1 (OverloadResolutionPriority)
1 parent 45fc724 commit 10aa5b7

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

_posts/2025-04-29-nlog-6-0-major-changes.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,14 +140,22 @@ NullReferenceException (NRE). NET5 introduced C# v9 with improved support for nu
140140
This will improve the user-experience, when using the NLog API directly instead of NLog configuration files.
141141

142142
### NLog Logger API with ReadOnlySpan
143-
NLog Logger now supports `params ReadOnlySpan` and can skip `params object[]`-allocation, when many parameters
143+
NLog Logger API now supports `params ReadOnlySpan` and can skip `params object[]`-allocation, when many parameters
144144
and LogLevel is not enabled.
145145

146-
NET9 introduced C# v13 that introduced `params ReadOnlySpan`, which is now supported by NLog for NetStandard2.1.
146+
NET9 introduced C# v13 that supports `params ReadOnlySpan`, which is now supported by NLog for NetStandard2.1.
147147

148148
NLog extends the optimization to completely skip the `params object[]`-allocation, when using message-templates
149149
and it is not possible to defer the parsing of the message-template on background thread.
150150

151+
### Legacy NLog Logger API reduced priority
152+
NLog Logger API has legacy methods from .NET Framework 1.0 without generics.
153+
154+
NET9 introduced C# v13 that supports `[OverloadResolutionPriority(-1)]` to change priority of methods, when other methods are available.
155+
156+
NLog Logger API will now promote the generic-methods and ReadOnlySpan-methods, instead of the legacy methods.
157+
This will hopefully reduce the friction when finally cleaning up these legacy methods, when not being in use.
158+
151159
### NLog GelfTarget and GelfLayout
152160

153161
The [NLog.Targets.Network](https://www.nuget.org/packages/NLog.Targets.Network) nuget-package also includes support for the Graylog Extended Log Format (GELF).

0 commit comments

Comments
 (0)