Skip to content

Instantly share code, notes, and snippets.

@WernerMairl
Created August 13, 2020 17:39
Show Gist options
  • Save WernerMairl/3ba9862930618ce6545228d9069c72dd to your computer and use it in GitHub Desktop.
Save WernerMairl/3ba9862930618ce6545228d9069c72dd to your computer and use it in GitHub Desktop.
JsonConsoleLoggerDemo
{
"Timestamp": null,
"EventId": 0,
"LogLevel": "Error",
"Category": "category",
"Message": "mystate",
"Exception": {
"Message": "Root",
"Type": "System.Exception",
"StackTrace": [
" at Microsoft.Extensions.Logging.Console.Test.JsonConsoleFormatterTests.EnsureStackTrace(Exception[] exceptions) in C:\\work\\dev\\runtime\\src\\libraries\\Microsoft.Extensions.Logging.Console\\tests\\JsonConsoleFormatterTests.cs:line 62"
],
"HResult": -2146233088,
"Data": {
"rootKey1": "rootExceptionDictionaryEntry1",
"rootKey2": "rootExceptionDictionaryEntry2"
},
"InnerExceptions": [
{
"Message": "InnerException",
"Type": "System.Exception",
"StackTrace": [
" at Microsoft.Extensions.Logging.Console.Test.JsonConsoleFormatterTests.EnsureStackTrace(Exception[] exceptions) in C:\\work\\dev\\runtime\\src\\libraries\\Microsoft.Extensions.Logging.Console\\tests\\JsonConsoleFormatterTests.cs:line 62"
],
"HResult": -2146233088,
"Data": {
"innerKey1": "innerExceptionDictionaryEntry1",
"innerKey2": "innerExceptionDictionaryEntry2"
}
}
]
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment