A pull request that allows the metadata to be retrieve by the function
would be accepted.



*José Valim*
www.plataformatec.com.br
Skype: jv.ptec
Founder and Director of R&D

On Fri, Nov 4, 2016 at 8:31 PM, <[email protected]> wrote:

> A variety of data (outgoing http requests, database queries, etc). We're
> attempting to structure all our log data. It's more about respecting the
> `Logger.log/3` signature so that Logger backends can do what they please
> with the metadata. Forcing the function to return a string limits that
> capabilities if we want to use compile time purging.
>
>
> On Friday, November 4, 2016 at 12:35:13 PM UTC-5, [email protected] wrote:
>>
>> Hi, I wanted to propose a change that allows a function passed to Logger
>> to also return it's associated metadata.
>>
>> For example, functions passed to Logger are only allowed to return a
>> string:
>>
>> Logger.debug fn -> "my log message" end
>>
>> I'm proposing:
>>
>> Logger.debug fn -> {"my log message", [meta: "data"]} end
>>
>> This way if people take advantage of compile time purging, any code
>> generating metadata is also removed.
>>
>> Is there any reason this would not be a good idea?
>>
>> Thanks!
>>
> --
> 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/d75aeb6e-54fd-4445-b4b6-
> b834c27d16a9%40googlegroups.com
> <https://groups.google.com/d/msgid/elixir-lang-core/d75aeb6e-54fd-4445-b4b6-b834c27d16a9%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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/CAGnRm4%2BKZQB7kN2Q3wqqdFkewf1G%2BvahmK8s-u_poTowhXJBbA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to