Nebo15 / logger_json

JSON logger formatter with support for Google Cloud, DataDog and other for Elixir.
https://nebo15.github.io/logger_json/
MIT License
242 stars 94 forks source link

Fix the inconsistency between the formatter init #96

Closed objectuser closed 2 years ago

objectuser commented 2 years ago

The @callback spec for the formatter init function was speced with a keyword list but the actual type is a map. This changes the spec and the two existing implemenations that returned lists to return maps.

Fixes #95

coveralls commented 2 years ago

Coverage Status

Coverage increased (+0.2%) to 75.573% when pulling 9d2003f4f83913639e1b8861c4a8611edefce933 on objectuser:fix-init-callback-inconsistency-95 into cc8d93289baff78f4a07c996efd1380bd6bb3542 on Nebo15:master.

AndrewDryga commented 2 years ago

@objectuser sorry for pushing a concurrent change, I only saw the PR after had everything ready locally. It was a bit more complex than just updating the type - we actually want to have a configuration set as a keyword list but allow DataDog logger to accept both keyword and map to prevent breaking changes. I've pushed a new release to address that. Thank you for PR anyway ❤️