Skip to content

Commit 6acadb4

Browse files
committed
handle original level in plain text logs
1 parent 14bcaed commit 6acadb4

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

src/SeqCli/PlainText/LogEvents/LogEventBuilder.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ public static LogEvent FromProperties(IDictionary<string, object?> properties, s
3838
var props = GetLogEventProperties(properties, remainder, level);
3939

4040
var fallbackMappedLevel = level != null ? LevelMapping.ToSerilogLevel(level) : LogEventLevel.Information;
41+
properties["SeqCliOriginalLevel"] = level;
4142

4243
return new LogEvent(
4344
timestamp,

src/SeqCli/PlainText/PlainTextLogEventReader.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ public async Task<ReadResult> TryReadAsync()
3535
throw new InvalidDataException($"A line arrived late or could not be parsed: `{frame.Value.Trim()}`.");
3636

3737
var (properties, remainder) = _nameValueExtractor.ExtractValues(frame.Value);
38+
3839
var evt = LogEventBuilder.FromProperties(properties, remainder);
3940
return new ReadResult(evt, frame.IsAtEnd);
4041
}

0 commit comments

Comments
 (0)