Skip to content

Commit dc90a2a

Browse files
committed
Fixed a bug, that caused the wrong exception type in the log statement
1 parent 073a2a6 commit dc90a2a

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

dvelop-sdk-logging/Logging.OtelJsonConsole/OtelJsonConsoleFormatter.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ private void WriteException(Utf8JsonWriter writer, Exception exception)
197197
}
198198

199199
writer.WriteStartObject("exception");
200-
writer.WriteString("type", typeof(Exception).ToString());
200+
writer.WriteString("type", exception.GetType().ToString());
201201
writer.WriteString("message", exception.Message);
202202
writer.WriteString("stacktrace", exceptionWithStacktrace);
203203
writer.WriteEndObject();

0 commit comments

Comments
 (0)