treessence / fr.bipi.tressence.file / FileLoggerTree

FileLoggerTree

class FileLoggerTree : FormatterPriorityTree

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

It is using java.util.logging.Logger to implement circular file logging

Parameters

priority - Priority from which to log

logger - java.util.logging.Logger used for logging

fileHandler - java.util.logging.FileHandler used for logging

path - Base path of file

nbFiles - Max number of files

Types

Builder

class Builder

Constructors

<init>

FileLoggerTree(logger: Logger, fileHandler: FileHandler?, path: String, nbFiles: Int, priority: Int, filter: Filter = NoFilter.INSTANCE, formatter: Formatter = LogcatFormatter.INSTANCE)

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

Properties

files

val files: Collection<File>

Inherited Properties

formatter

var formatter: Formatter

Functions

clear

fun clear(): Unit

Delete all log files

getFileName

fun getFileName(i: Int): String

Return the file name corresponding to the number

log

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

Inherited Functions

format

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

Use its formatter to format log

withFormatter

fun withFormatter(newFormatter: Formatter): FormatterPriorityTree