This is something that can/should be done in a library, but there’s a
number of incomplete, outdated, or half-finished JSON formatters on hex.pm
and there is probably a good opportunity for an opinionated `Nimble`
library…

-a

On Wed, Dec 9, 2020 at 1:04 AM José Valim <jose.va...@dashbit.co> wrote:

> 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 <btkost...@gmail.com> 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 elixir-lang-core+unsubscr...@googlegroups.com.
>> 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 elixir-lang-core+unsubscr...@googlegroups.com.
> 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
> <https://groups.google.com/d/msgid/elixir-lang-core/CAGnRm4J7UfH9hcvVWnZ%2B%3DFzo%2BeG9XqdbspwtAFQM2MdVR0_H9Q%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
>


-- 
Austin Ziegler • halosta...@gmail.com • aus...@halostatue.ca
http://www.halostatue.ca/http://twitter.com/halostatue

-- 
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 elixir-lang-core+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elixir-lang-core/CAJ4ekQtA1qkmA4Qwz-1VGCvTv9QwDZduEoL1rHXQ3ngf_o6K%2Bg%40mail.gmail.com.

Reply via email to