JakeWharton / timber

A logger with a small, extensible API which provides utility on top of Android's normal Log class.
https://jakewharton.github.io/timber/docs/5.x/
Apache License 2.0
10.41k stars 959 forks source link

Allow to log custom objects #368

Closed danielgomezrico closed 4 years ago

danielgomezrico commented 5 years ago

First, thanks for this awesome library.

The idea is to allow timber to serialize the args that you send into the log, and be able to get the objects in custom Timber.Tree. Currently the trees just get the message and tag, but not the args with its own types.

One idea:

Timber.o("my message", myCustomObjectInstance)

And then on the tree allow to receive that custom object.

This is helpfull if you have a lot of kotlin sealed event classes for instance and want to log into some analytics with properties on it.

JakeWharton commented 4 years ago

Sounds like #184. Let's consolidate on that issue.