Skip to content

Commit 765bc47

Browse files
author
Christoph Bühler
committed
feat(logging): add full exception message if any
1 parent 20ad9d6 commit 765bc47

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/KubeOps/Operator/Logging/StructuredConsoleLogger.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ public void Log<TState>(LogLevel logLevel, EventId eventId, TState state, Except
4242

4343
if (exception != null)
4444
{
45-
message.ExceptionMessage = exception.Message;
45+
message.Exception = exception.ToString();
4646
}
4747

4848
Console.WriteLine(JsonConvert.SerializeObject(message, _jsonSettings));
@@ -56,7 +56,7 @@ private struct LogMessage
5656

5757
public string Message { get; set; }
5858

59-
public string ExceptionMessage { get; set; }
59+
public string Exception { get; set; }
6060

6161
public IDictionary<string, object> Parameters { get; set; }
6262
}

0 commit comments

Comments
 (0)