Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initial draft of NLog v6 goals #255

Merged
merged 8 commits into from
Oct 1, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 41 additions & 0 deletions _posts/2024-10-01-nlog-6-0-goals.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
---
layout: post
title: NLog 6.0 goals
---

NLog v6.0 has the following goals:

- Support Ahead-of-Time (AOT) builds without warnings
- Support Nullable references
- Remove old target platforms `NetStandard1.3` + `NetStandard1.5`
- Cleanup interfaces for `Logger` / `ILogger` to remove unnecessary boxing optimizations from .NET v1
- Remove `System.Text.RegularExpressions` dependency since a heavy dependency for AOT
- Need to implement a minimal syntax-support for NLog Logging Rules. Ex. `?` and `*`
- Remove `System.Xml` dependency since a heavy dependency for AOT
- Need to implement a minimal XML reader to continue loading `NLog.config` XML files
- Extract NLog.Targets.WebServiceTarget to its own nuget-package
- Extract NLog.Targets.NetworkTarget to its own nuget-package
- Extract NLog.Targets.MailTarget to its own nuget-package
- Extract NLog.Targets.FileTarget to its own nuget-package NLog.Targets.ConcurrentFileTarget
- NLog will instead have a simple FileTarget without ConcurrentWrites-support but only KeepFileOpen = false

The overall goal for NLog v6.0 is to continue being a fully working logging-library in a single nuget-package.
The NLog-package will out of the box only handle file- and console-output, which will probably cover 90 pct.
of the use cases. When needing other output targets or formats, then additional nuget-packages must be included.

The planned interface cleanup for `Logger` / `ILogger` will probably give a lot of headache,
as it will require all dependencies to be upgraded before upgrading the main-application.
Where NLog v5 was mostly an update of default values for the main-application to handle,
then the upgrade to NLog v6 will affect the entire dependency- / project-tree.

Another goal is that all existing nuget-packages that depends on NLog v4, should continue to function with NLog v6.
This means NLog v6 will continue to support obsolete API-methods, that are relevant for custom NLog targets.

.NET8 already have great support for AOT, but many Microsoft teams are still working on updating
their nuget-packages to support AOT. Believe the goal for .NET9 is to ensure even more nuget-packages
will fully support AOT, to allow more ASP.NET or MAUI applications to start using AOT.
NLog should not become a blocker, when wanting to try out AOT builds.

This means NLog v5 will now go into maintenance mode (together with NLog v4), and focus
will now be on getting NLog v6 preview build ready. If having suggestions for the future direction
of the [NLog v6 milestone](https://github.com/NLog/NLog/milestone/29) then [comments are wellcome](https://github.com/NLog/NLog/issues/4931).
Loading