treessence / fr.bipi.tressence.console / ThrowErrorTree

ThrowErrorTree

class ThrowErrorTree : PriorityTree

An implementation of Timber.Tree which throws java.lang.Error when priority of log is exceeded the limit. Useful for development or test environment.

Parameters

priority - Minimum log priority to throw error. Expects one of constants defined in Log.

Constructors

<init>

ThrowErrorTree(priority: Int = Log.ERROR, filter: Filter = NoFilter.INSTANCE)

An implementation of Timber.Tree which throws java.lang.Error when priority of log is exceeded the limit. Useful for development or test environment.

Inherited Properties

filter

var filter: Filter

priorityFilter

val priorityFilter: PriorityFilter

Functions

log

fun log(priority: Int, tag: String?, message: String, t: Throwable?): Unit

Inherited Functions

isLoggable

open fun isLoggable(priority: Int): Boolean
open fun isLoggable(tag: String?, priority: Int): Boolean

skipLog

fun skipLog(priority: Int, tag: String?, message: String, t: Throwable?): Boolean

Use the additional filter to determine if this log needs to be skipped

withFilter

fun withFilter(newFilter: Filter): PriorityTree