Closed kaushikgopal closed 4 years ago
The trouble with this proposal/discussion is that it does change the purpose/direction of vararg arg
.
Currently, it serves as a convenience for string formatting (which was served well in Java land), but with Kotlin's powerful string interpolation, it feels like the vararg could be better leveraged by providing metadata around logs?
Can you add your usecase to #184 in as much detail as you're able to share?
Kotlin inline functions and deferred lambdas and string templating is coming, but that's going to be totally separate from "context" arguments. Vararg is kinda terrible because you're allocating the array and filling its contents even when logging is disabled. And even when it's enabled, you immediately unpack the array. Bad all around. I don't want to re-use it for contexts/metadata.
I'm getting back into Timber soon™. I know it's been kinda stuck for a while.
Kanuengnit strange
On Sat, 23 May 2020, 03:57 Jake Wharton, notifications@github.com wrote:
Closed #392 https://github.com/JakeWharton/timber/issues/392.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/JakeWharton/timber/issues/392#event-3366625978, or unsubscribe https://github.com/notifications/unsubscribe-auth/APACBR3LRLDOVTCWBDU6W4LRS43RPANCNFSM4NHG3R3Q .
@JakeWharton so how do you go about implementing this feature? what is the best way to achieve this?
I'm getting back into Timber soon™.
ping
No. Unless you'd like pay me, you don't control how I spend time.
This is a potential feature request
With a lot of third party (logging/monitoring/crash) services, there are times when it's useful to send metadata at a per log level (as against the global user level).
so basically instead of:
supply the args sent in as well
This allows branch trees to potentially send the args separately to a service (potentially attaching it as more metadata).
Can add more context, if the use case doesn't make sense. I think it's similar to what was brought up here (I think).