Logging to file made easy
Teagger helps you to keep your logs forever or ship them back to you instantly.
Create your instance with a file or stream:
class App: Application() {
override fun onCreate() {
Teagger.start(this) { withFile(getMyFile(context)) }
}
}
And use it:
fun logSomething() {
Teagger.v("something") // gets scheduled to be written on disk
}
Use Timber integration:
Timber.plant(TeaggerTree())
Customize entries:
Teagger.instance.entryTransformer = object : LogEntryDelegate { /*...*/ }
Optionally display UI:
<application>
<activity android:name="com.skoumal.teagger.ui.LoggerActivity" />
</application>
Don't forget to register a FileProvider!
dependencies {
implementation "com.skoumal:teagger:${ext.teagger}"
}