Using serilog to log a object, e.g. Log.Information("{@log}", log)
. Where log is a custom object.
The logs comes out like
{
"@t": "2020-01-24T09:31:23.5064000Z",
"@mt": "{@log}",
"log": {
"TraceId": "e57afecc-8efe-4d48-8057-d46cce71c3d9",
"Timestamp": "01/24/2020 09:31:23",
"Service": "serviceType",
"Action": "actionType",
"$type": "BaseLog"
}
}
I'd like not to have the extra serilog properties on there, and just have a flat structure of my log, e.g.
Even when i'm using CompactJsonFormatter
{
"TraceId": "e57afecc-8efe-4d48-8057-d46cce71c3d9",
"Timestamp": "01/24/2020 09:31:23",
"Service": "serviceType",
"Action": "actionType"
}
Is there an option/extension to serilog where I can remove these?