treessence / fr.bipi.tressence.base / FormatterPriorityTree

FormatterPriorityTree

open class FormatterPriorityTree : PriorityTree

Base class to filter logs by priority

Constructors

<init>

FormatterPriorityTree(priority: Int, filter: Filter = NoFilter.INSTANCE, formatter: Formatter = NoTagFormatter.INSTANCE)

Base class to filter logs by priority

Properties

formatter

var formatter: Formatter

Inherited Properties

filter

var filter: Filter

priorityFilter

val priorityFilter: PriorityFilter

Functions

format

fun format(priority: Int, tag: String?, message: String): String

Use its formatter to format log

log

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

withFormatter

fun withFormatter(newFormatter: Formatter): FormatterPriorityTree

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

Inheritors

FileLoggerTree

class FileLoggerTree : FormatterPriorityTree

An implementation of Timber.Tree which sends log into a circular file.

SentryBreadcrumbTree

class SentryBreadcrumbTree : FormatterPriorityTree

Logger that will store a Breadcrumb. Throwable are ignored.

SystemLogTree

class SystemLogTree : FormatterPriorityTree

An implementation of Timber.Tree which log using System.out print() method.

TextViewTree

class TextViewTree : FormatterPriorityTree

An implementation of Timber.Tree which sends log into a text view