Skip to content

Commit

Permalink
Use the log event severity if the property is not present.
Browse files Browse the repository at this point in the history
  • Loading branch information
codebrain committed Dec 10, 2019
1 parent 0901c7a commit 2b30452
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Elastic.CommonSchema.Serilog/LogEventConverter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -267,8 +267,8 @@ private static Event GetEvent(LogEvent e)
? actionKind.ToString().Replace("\"", "")
: null,
Severity = e.Properties.TryGetValue(SpecialKeys.ActionSeverity, out var actionSev)
? (long?)long.Parse(actionSev.ToString())
: null,
? long.Parse(actionSev.ToString())
: (int)e.Level,
Timezone = TimeZoneInfo.Local.StandardName
};

Expand Down

0 comments on commit 2b30452

Please sign in to comment.