You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: _posts/2025-04-29-nlog-6-0-major-changes.md
+3-1Lines changed: 3 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -454,7 +454,9 @@ Alternative one can setup custom subscriber to NLog `InternalLogger.InternalEven
454
454
### NLog RequiredParameter attribute ignored
455
455
456
456
NLog has removed validation for properties marked with `[RequiredParameter]`, where NLog previously warned if target or layout option was missing a value.
457
-
NLog now uses nullable reference types, so required options are non-nullable and therefore always expected to have a value.
457
+
NLog now uses nullable reference types, so required properties are non-nullable and therefore always expected to have a value.
458
+
459
+
NLog startup performance has become a little faster, as it now can skip reflection to find all properties marked with `[RequiredParameter]` and checking their values.
458
460
459
461
This means that authors of NLog Targets or Layouts should not rely on the obsolete `[RequiredParameter]`,
460
462
but should instead perform their own validation of options during initialization. Ex:
0 commit comments