Hi Blake, Logger already provides a custom formatter and you can replace
the formatter to emit JSON instead.

We don't intend to include a JSON specific formatter by default because
this is something that can be trivially done as a library (and there is no
benefit doing it from core itself compared to a lib).

On Wed, Dec 9, 2020 at 4:27 AM Blake Kostner <[email protected]> wrote:

> Considered the growth of structured logging, it would be really nice if
> elixir included a JSON Logger backend by default. This would be very basic
> and not include any weird paths or third party service specific fields, but
> it would wrap up multi line outputs (like stack traces) to a single line
> for easier parsing.
>
> I would also note that this backend would have to take the `json_library`
> option (similar to other packages) in the configuration to avoid bringing
> all of that stuff to core.
>
> --
> You received this message because you are subscribed to the Google Groups
> "elixir-lang-core" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/elixir-lang-core/38c7eba9-9b58-47c4-be2e-061e9991f8adn%40googlegroups.com
> <https://groups.google.com/d/msgid/elixir-lang-core/38c7eba9-9b58-47c4-be2e-061e9991f8adn%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"elixir-lang-core" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elixir-lang-core/CAGnRm4J7UfH9hcvVWnZ%2B%3DFzo%2BeG9XqdbspwtAFQM2MdVR0_H9Q%40mail.gmail.com.

Reply via email to