Skip to content

Commit 35587cd

Browse files
committed
NLog v6 - FileTarget without ConcurrentWrites
1 parent 0da0809 commit 35587cd

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

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

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -119,14 +119,15 @@ NLog FileTarget no longer has the following options:
119119
- ForceMutexConcurrentWrites - Removed together with ConcurrentWrites.
120120
- NetworkWrites - Replaced by KeepFileOpen.
121121

122-
There is a new [NLog.Targets.ConcurrentFile](https://www.nuget.org/packages/NLog.Targets.ConcurrentFile)-nuget-package, which is
123-
the original NLog FileTarget with all its features and complexity. It is the goal that [NLog.Targets.ConcurrentFile](https://www.nuget.org/packages/NLog.Targets.ConcurrentFile)-nuget-package
124-
should become legacy, but it might be helpful when upgrading to NLog v6.
125-
126122
Alternative options for replacing `ConcurrentWrites = true`:
127123
- 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.
128124
- Change to use `KeepFileOpen = false` where file is opened / closed when writing LogEvents. For better performance then consider to also use `<targets async="true">`.
129125

126+
There is also a new [NLog.Targets.ConcurrentFile](https://www.nuget.org/packages/NLog.Targets.ConcurrentFile)-nuget-package, which is
127+
the original NLog FileTarget with all its features and complexity. It supports ConcurrentWrites using global mutex,
128+
but the goal is that [NLog.Targets.ConcurrentFile](https://www.nuget.org/packages/NLog.Targets.ConcurrentFile)-nuget-package will become legacy,
129+
but it might be helpful when upgrading to NLog v6.
130+
130131
### NLog AtomicFileTarget without mutex
131132

132133
New AtomicFileTarget has been introduced with [NLog.Targets.AtomicFile](https://www.nuget.org/packages/NLog.Targets.AtomicFile),

0 commit comments

Comments
 (0)