Closed ThiagoBarradas closed 1 year ago
This is exactly what I need!
Hello @AndrewMD5, can you review my PR please?
=)
Hi @ThiagoBarradas Thanks for the contribution, sorry for the late response. Can you provide an example of how the current implementation is broken? I would like to reproduce it to validate this fix.
Or alternatively you could add a unit test demonstrating the fix.
We removed the JSON serializer in favor of exposing the underlying ITextFormatter
interface in https://github.com/DataDog/serilog-sinks-datadog-logs/pull/86
With this change you can format your logs however you like without library changes.
When we have a default configuration like:
It can change sink behaviour.
In my tests, changing ContractResolver (to snakecase for example), it changes root properties do default contract resolver instead keep original value.
To fix it, I create OriginalCaseNamingResolver to keep original property name instead of default configuration.
I add a IsoDateTimeConverter too, to fix the same behavior (when default exists, timestamp is changed to another time)
--
Temporarily, I add a copy of project with this changes in my project until my PR is merged
Thanks!