Skip to content

Commit

Permalink
Merge pull request #11 from elastic/severity-level
Browse files Browse the repository at this point in the history
Use the log event severity if the property is not present.
  • Loading branch information
codebrain authored Dec 11, 2019
2 parents 0901c7a + 2b30452 commit 4567c5e
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 4567c5e

Please sign in to comment.