Closed kevin-papa closed 2 years ago
Hello @kevin-papa, thank you for a good catch! A PR would be welcome to change the typespec, otherwise I'll just do it myself in a bit of time.
@AndrewDryga BTW I do think this is a breaking change between 5.0 and 5.1. It used to be that a Keyword list worked from the init
but no longer does. That's what pointed me to this.
@objectuser indeed there is an inconsistency with it but there are no breaking changes - formatter_opts
are recently added and only this option was affected. I've pushed a change that will fix this inconsistency: https://github.com/Nebo15/logger_json/commit/e363887361cf5f265686113ce480722bba53cea7
As I was upgrading from 5.0 to 5.1 I noticed that the callback here is inconsistent with the DataDog implementation:
https://github.com/Nebo15/logger_json/blob/93ef51c84cdad8507a4e0a304f4ca2dc9d68a099/lib/logger_json/formatter.ex#L14
DataDog:
https://github.com/Nebo15/logger_json/blob/93ef51c84cdad8507a4e0a304f4ca2dc9d68a099/lib/logger_json/formatters/datadog_logger.ex#L35