PureeLogger

class PureeLogger

Puree Log collector.

Ideally, only one instance of this class should exist and should be treated as singleton. To create an instance use Builder:

PureeLogger.Builder(
logSerializer = { log ->
// Serialize log
},
logStore = DbPureeLogStore(context, "puree.db")
)
.filter(
AddTimeFilter(),
ClickLog::class.java, EventLog::class.java
)
.output(
LogcatOutput(),
ClickLog::class.java, EventLog::class.java
)
.build()

See also

Types

Builder
Link copied to clipboard
class Builder(lifecycle: Lifecycle, logSerializer: PureeLogSerializer, logStore: PureeLogStore)
The builder for PureeLogger class.
LogNotRegisteredException
Link copied to clipboard
class LogNotRegisteredException : Exception

Functions

flush
Link copied to clipboard
fun flush()
Force-flush all of the buffered logs regardless of the flush interval
postLog
Link copied to clipboard
fun postLog(log: PureeLog)
Sends a log through PureeLogger.