Trainer

interface Trainer(source)

Trainer interface for handling log messages in barK

Trainers are responsible for determining how and where log messages are output. Different trainers can handle logs differently - some might write to Android's Logcat, others to files, remote services, or colored console output for tests.

Trainers should implement their own level filtering if needed, as the Bark object delegates all messages to all trained Trainers.

Since

0.0.1

Inheritors

AndroidLogTrainer
UnitTestTrainer
NSLogTrainer

Properties

Link copied to clipboard
abstract val minLevel: Level

The minimum Level of the logs that will be outputted by this Trainer.

Link copied to clipboard
abstract val pack: Pack

The Pack that this Trainer belongs to, which will be used to find duplicative trainers and avoid duplicative log messages.

Functions

Link copied to clipboard
abstract fun handle(level: Level, tag: String, message: String, throwable: Throwable?)

Handle a log message.