AndroidLogTrainer

open class AndroidLogTrainer(val minLevel: Level = Level.VERBOSE) : Trainer(source)

AndroidLogTrainer handles logging to Android's Logcat system.

This trainer outputs logs using Android's built-in Log class, which makes them visible in Android Studio's Logcat window and device logs.

The trainer automatically detects test environments and disables itself during tests to avoid interfering with test console output.

Since

0.0.1

Parameters

minLevel

Minimum log level to output (defaults to Level.VERBOSE - shows all)

Inheritors

Constructors

Link copied to clipboard
constructor(minLevel: Level = Level.VERBOSE)

Properties

Link copied to clipboard
open override val minLevel: Level
Link copied to clipboard
open override 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
open override fun handle(level: Level, tag: String, message: String, throwable: Throwable?)

Handle a log message by outputting it to Android Logcat.

Link copied to clipboard
open fun skipTests(): Boolean

Denote whether we should log while running tests or not - can be overridden by subclasses.