Skip to content

Commit d20c2a9

Browse files
committedApr 29, 2025
NLog v6 - Preview1 (Fix links to nuget-packages)
1 parent 16ac77c commit d20c2a9

File tree

1 file changed

+22
-21
lines changed

1 file changed

+22
-21
lines changed
 

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

Lines changed: 22 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,14 @@ This can lead to overhead for AOT builds, as it must include and compile all the
1717

1818
NLog v6 attempts to reduce its footprint by extracting several features into separate nuget-packages:
1919

20-
- NLog.RegEx - Depends on System.Text.RegularExpressions which is a huge dependency for a logging library.
21-
- NLog.Targets.ConcurrentFile - ConcurrentWrites using global mutex from operating system API.
22-
- NLog.Targets.AtomicFile - ConcurrentWrites using atomic file-append from operating system API.
23-
- NLog.Targets.GZipFile - EnableArchiveFileCompression using GZipStream for writing GZip compressed log-files.
24-
- NLog.Targets.Mail - Depends on System.Net.Mail.SmtpClient.
25-
- NLog.Targets.Network - Depends on TCP and UDP Network Socket, and adds support for Syslog and Graylog.
26-
- NLog.Targets.Trace - Depends on System.Diagnostics.TraceListener.
27-
- NLog.Targets.WebService - Depends on System.Net.Http.HttpClient.
20+
- [NLog.Targets.AtomicFile](https://www.nuget.org/packages/NLog.Targets.AtomicFile) - ConcurrentWrites using atomic file-append from operating system API.
21+
- [NLog.Targets.ConcurrentFile](https://www.nuget.org/packages/NLog.Targets.ConcurrentFile) - ConcurrentWrites using global mutex from operating system API.
22+
- [NLog.Targets.GZipFile](https://www.nuget.org/packages/NLog.Targets.GZipFile) - EnableArchiveFileCompression using GZipStream for writing GZip compressed log-files.
23+
- [NLog.Targets.Mail](https://www.nuget.org/packages/NLog.Targets.Mail) - Depends on System.Net.Mail.SmtpClient.
24+
- [NLog.Targets.Network](https://www.nuget.org/packages/NLog.Targets.Network) - Depends on TCP and UDP Network Socket, and adds support for Syslog and Graylog.
25+
- [NLog.Targets.Trace](https://www.nuget.org/packages/NLog.Targets.Trace) - Depends on System.Diagnostics.TraceListener.
26+
- [NLog.Targets.WebService](https://www.nuget.org/packages/NLog.Targets.WebService) - Depends on System.Net.Http.HttpClient.
27+
- [NLog.RegEx](https://www.nuget.org/packages/NLog.RegEx) - Depends on System.Text.RegularExpressions which is a huge dependency for a logging library.
2828

2929
NLog v6 also no longer depends on `System.Xml.XmlReader`, but now includes its own basic XmlParser for loading `NLog.config` files.
3030

@@ -75,24 +75,24 @@ NLog FileTarget no longer has the following options:
7575
- ArchiveDateFormat - Marked as obsolete. Instead use new ArchiveSuffixFormat
7676
- ArchiveNumbering - Marked as obsolete. Instead use new ArchiveSuffixFormat (Rolling is unsupported).
7777

78-
If one still requires these options, then one can use the new NLog.Targets.ConcurrentFile-nuget-package.
79-
NLog.Targets.ConcurrentFile-nuget-package is the original NLog FileTarget with all its features and complexity.
80-
The goal is that NLog.Targets.ConcurrentFile-nuget-package should become legacy, but it might help some when upgrading to NLog v6.
78+
If one still requires these options, then one can use the new [NLog.Targets.ConcurrentFile](https://www.nuget.org/packages/NLog.Targets.ConcurrentFile)-nuget-package.
79+
[NLog.Targets.ConcurrentFile](https://www.nuget.org/packages/NLog.Targets.ConcurrentFile)-nuget-package is the original NLog FileTarget with all its features and complexity.
80+
The goal is that [NLog.Targets.ConcurrentFile](https://www.nuget.org/packages/NLog.Targets.ConcurrentFile)-nuget-package should become legacy, but it might help some when upgrading to NLog v6.
8181

8282
Alternative options for replacing `ConcurrentWrites = true`:
83-
- Use the new nuget-package NLog.Targets.AtomicFile where AtomicFileTarget uses atomic file-appends and supports Windows / Linux with NET8.
83+
- Use the new nuget-package [NLog.Targets.AtomicFile](https://www.nuget.org/packages/NLog.Targets.AtomicFile) where AtomicFileTarget uses atomic file-appends and supports Windows / Linux with NET8.
8484
- Change to use `KeepFileOpen = false` where file is opened / closed when writing LogEvents. Recommended to use `<targets async="true">`.
8585

8686
Alternative options for replacing `EnableArchiveFileCompression = true`:
8787
- Activate NTFS compression for the logging-folder.
8888
- Setup cron-job / scheduled-task that performs ZIP-compression and cleanup of the logging-folder.
8989
- Implement background task in the application, which monitors the logging-folder and performs ZIP-compression and cleanup.
90-
- Use the new nuget-package NLog.Targets.GZipFile where GZipFileTarget writes directly to a compressed log-file using GZipStream.
90+
- Use the new nuget-package [NLog.Targets.GZipFile](https://www.nuget.org/packages/NLog.Targets.GZipFile) where GZipFileTarget writes directly to a compressed log-file using GZipStream.
9191

9292
### NLog AtomicFileTarget without mutex
9393

94-
New AtomicFileTarget has been introduced, that supports atomic file-append with help from the operating system,
95-
and supports both Windows and Linux (with help from Mono Posix) for NET8 (and newer).
94+
New AtomicFileTarget has been introduced with [NLog.Targets.AtomicFile](https://www.nuget.org/packages/NLog.Targets.AtomicFile),
95+
that supports atomic file-append with help from the operating system, and supports both Windows and Linux (with help from Mono Posix) for NET8 (and newer).
9696

9797
Extends the standard FileTarget and adds support for `ConcurrentWrites = true`, but without using global mutex.
9898

@@ -101,7 +101,8 @@ correct publish of the `Mono.Posix.NETStandard`-nuget-package dependency.
101101

102102
### NLog GZipFileTarget with GZipStream
103103

104-
New GZipFileTarget has been introduced, that writes directly to a compressed log-file using GZipStream.
104+
New GZipFileTarget has been introduced with [NLog.Targets.GZipFile](https://www.nuget.org/packages/NLog.Targets.GZipFile) nuget-package,
105+
that writes directly to a compressed log-file using GZipStream.
105106

106107
Extends the standard FileTarget and adds support for `EnableArchiveFileCompression = true`, but only supports
107108
GZip file compression.
@@ -130,7 +131,7 @@ but will only perform synchronous NLog Target Close.
130131

131132
### NLog GelfTarget and GelfLayout
132133

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

135136
The `GelfTarget` extends the standard `NetworkTarget` with the new `GelfLayout`.
136137

@@ -139,15 +140,15 @@ custom property-names with underscore `_`.
139140

140141
### NLog SyslogTarget and SyslogLayout
141142

142-
The NLog.Targets.NetworkTarget nuget-package also includes support for the Syslog Output Format.
143+
The [NLog.Targets.Network](https://www.nuget.org/packages/NLog.Targets.Network) nuget-package also includes support for the Syslog Output Format.
143144

144145
The `SyslogTarget` extends the standard `NetworkTarget` with the new `SyslogLayout`.
145146

146147
The `SyslogLayout` supports both RFC-3164 (simple) + RFC-5424 (structured) logging output.
147148

148149
### NLog NetworkTarget with NoDelay = true
149150

150-
The NLog.Targets.NetworkTarget nuget-package includes support for configuring TCP_NODELAY.
151+
The [NLog.Targets.Network](https://www.nuget.org/packages/NLog.Targets.Network) nuget-package includes support for configuring TCP_NODELAY.
151152
The `NetworkTarget` will by default use `NoDelay = true` to turn off delayed ACK,
152153
to avoid delays of 200ms because of nagle-algorithm.
153154

@@ -156,7 +157,7 @@ a delay of 200ms.
156157

157158
### NLog NetworkTarget with SendTimeoutSeconds = 100
158159

159-
The NLog.Targets.NetworkTarget nuget-package changes the default value of TCP SendTimeout
160+
The [NLog.Targets.Network](https://www.nuget.org/packages/NLog.Targets.Network) nuget-package changes the default value of TCP SendTimeout
160161
from waiting forever to 100 secs.
161162

162163
The `NetworkTarget` should now react to the network-cable being unplugged and the TCP send-window being filled.
@@ -165,7 +166,7 @@ The `NetworkTarget` should now automatically attempt to reconnect when the endpo
165166

166167
### NLog NetworkTarget with SslCertificateFile
167168

168-
The NLog.Targets.NetworkTarget nuget-package introduces the ability to specify custom SSL certificate from file.
169+
The [NLog.Targets.Network](https://www.nuget.org/packages/NLog.Targets.Network) nuget-package introduces the ability to specify custom SSL certificate from file.
169170

170171
The `NetworkTarget` now recognizes these new settings:
171172
- `Layout SslCertificateFile`

0 commit comments

Comments
 (0)