Skip to content

Commit d1584f6

Browse files
committed
Improve description of obsoleted RequiredParameter
1 parent 4c75b37 commit d1584f6

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -454,7 +454,9 @@ Alternative one can setup custom subscriber to NLog `InternalLogger.InternalEven
454454
### NLog RequiredParameter attribute ignored
455455

456456
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.
458460

459461
This means that authors of NLog Targets or Layouts should not rely on the obsolete `[RequiredParameter]`,
460462
but should instead perform their own validation of options during initialization. Ex:

0 commit comments

Comments
 (0)