Skip to content

Commit

Permalink
elastic#398 set Event Kind to event if not provided
Browse files Browse the repository at this point in the history
  • Loading branch information
thompson-tomo committed Jun 2, 2024
1 parent c4f41f8 commit 5c75477
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Elastic.CommonSchema.NLog/EcsLayout.cs
Original file line number Diff line number Diff line change
Expand Up @@ -500,7 +500,7 @@ private Event GetEvent(LogEventInfo logEventInfo)
Action = EventAction?.Render(logEventInfo),
Id = EventId?.Render(logEventInfo),
Code = eventCode,
Kind = EventKind?.Render(logEventInfo),
Kind = EventKind?.Render(logEventInfo) ?? "event",
Severity = !string.IsNullOrEmpty(eventSeverity)
? long.Parse(eventSeverity)
: GetSysLogSeverity(logEventInfo.Level),
Expand Down
2 changes: 1 addition & 1 deletion src/Elastic.CommonSchema.Serilog/LogEventConverter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ private static Event GetEvent(LogEvent e)
Id = e.TryGetScalarString(SpecialKeys.ActionId, out var actionId)
? actionId
: null,
Kind = e.TryGetScalarString(SpecialKeys.ActionKind, out var actionKind) ? actionKind : null,
Kind = e.TryGetScalarString(SpecialKeys.ActionKind, out var actionKind) ? actionKind : "event",
Severity = e.TryGetScalarString(SpecialKeys.ActionSeverity, out var actionSev)
? long.Parse(actionSev)
: (int)e.Level,
Expand Down

0 comments on commit 5c75477

Please sign in to comment.