treessence / fr.bipi.tressence.base / PriorityTree

PriorityTree

open class PriorityTree : DebugTree

Base class to filter logs by priority

Constructors

<init>

PriorityTree(priority: Int, filter: Filter = NoFilter.INSTANCE)

Base class to filter logs by priority

Properties

filter

var filter: Filter

priorityFilter

val priorityFilter: PriorityFilter

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

Inheritors

FormatterPriorityTree

open class FormatterPriorityTree : PriorityTree

Base class to filter logs by priority

SentryEventTree

class SentryEventTree : PriorityTree

Logger that will log to sentry server

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.