Skip to content

Commit 70a89a9

Browse files
committed
NLogLogger - Skip enumerating Properties when empty collection
1 parent b768bf7 commit 70a89a9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Akka.Logger.NLog/NLogLogger.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ private static void LogEvent(LogEvent logEvent, NLogLevel logLevel)
6464

6565
// Add structured logging properties from semantic logging
6666
// This enables NLog layouts and targets to access structured properties by name
67-
if (logEvent.TryGetProperties(out var properties))
67+
if (logEvent.TryGetProperties(out var properties) && properties?.Count > 0)
6868
{
6969
foreach (var prop in properties)
7070
{

0 commit comments

Comments
 (0)