|
| 1 | +--- |
| 2 | +layout: post |
| 3 | +title: NLog 6.0 goals |
| 4 | +--- |
| 5 | + |
| 6 | +NLog v6.0 has the following goals: |
| 7 | + |
| 8 | +- Support Ahead-of-Time (AOT) builds without warnings |
| 9 | +- Support Nullable references |
| 10 | +- Remove old target platforms `NetStandard1.3` + `NetStandard1.5` |
| 11 | +- Cleanup interfaces for `Logger` / `ILogger` to remove unnecessary boxing optimizations from .NET v1 |
| 12 | +- Remove `System.Text.RegularExpressions` dependency since a heavy dependency for AOT |
| 13 | + - Need to implement a minimal syntax-support for NLog Logging Rules. Ex. `?` and `*` |
| 14 | +- Remove `System.Xml` dependency since a heavy dependency for AOT |
| 15 | + - Need to implement a minimal XML reader to continue loading `NLog.config` XML files |
| 16 | +- Extract NLog.Targets.WebServiceTarget to its own nuget-package |
| 17 | +- Extract NLog.Targets.NetworkTarget to its own nuget-package |
| 18 | +- Extract NLog.Targets.MailTarget to its own nuget-package |
| 19 | +- Extract NLog.Targets.FileTarget to its own nuget-package NLog.Targets.ConcurrentFileTarget |
| 20 | + - NLog will instead have a simple FileTarget without ConcurrentWrites-support but only KeepFileOpen = false |
| 21 | + |
| 22 | +The overall goal for NLog v6.0 is to continue being a fully working logging-library in a single nuget-package. |
| 23 | +The NLog-package will out of the box only handle file- and console-output, which will probably cover 90 pct. |
| 24 | +of the use cases. When needing other output targets or formats, then additional nuget-packages must be included. |
| 25 | + |
| 26 | +The planned interface cleanup for `Logger` / `ILogger` will probably give a lot of headache, |
| 27 | +as it will require all dependencies to be upgraded before upgrading the main-application. |
| 28 | +Where NLog v5 was mostly an update of default values for the main-application to handle, |
| 29 | +then the upgrade to NLog v6 will affect the entire dependency- / project-tree. |
| 30 | + |
| 31 | +Another goal is that all existing nuget-packages that depends on NLog v4, should continue to function with NLog v6. |
| 32 | +This means NLog v6 will continue to support obsolete API-methods, that are relevant for custom NLog targets. |
| 33 | + |
| 34 | +.NET8 already have great support for AOT, but many Microsoft teams are still working on updating |
| 35 | +their nuget-packages to support AOT. Believe the goal for .NET9 is to ensure even more nuget-packages |
| 36 | +will fully support AOT, to allow more ASP.NET or MAUI applications to start using AOT. |
| 37 | +NLog should not become a blocker, when wanting to try out AOT builds. |
| 38 | + |
| 39 | +This means NLog v5 will now go into maintenance mode (together with NLog v4), and focus |
| 40 | +will now be on getting NLog v6 preview build ready. If having suggestions for the future direction |
| 41 | +of the [NLog v6 milestone](https://github.com/NLog/NLog/milestone/29) then [comments are wellcome](https://github.com/NLog/NLog/issues/4931). |
0 commit comments