zcash-android-wallet-sdk / cash.z.wallet.sdk.ext / TroubleshootingTwig

TroubleshootingTwig

open class TroubleshootingTwig : Twig

A tiny log for detecting troubles. Aim at your troubles and pull the twigger.

Parameters

formatter - a formatter for the twigs. The default one is pretty spiffy.

printer - a printer for the twigs. The default is System.err.println.

Constructors

<init>

A tiny log for detecting troubles. Aim at your troubles and pull the twigger.

TroubleshootingTwig(formatter: (String) -> String = spiffy(5), printer: (String) -> Any = System.err::println)

Properties

formatter

a formatter for the twigs. The default one is pretty spiffy.

val formatter: (String) -> String

printer

a printer for the twigs. The default is System.err.println.

val printer: (String) -> Any

Functions

twig

Actually print and format the log message, unlike the SilentTwig, which does nothing.

open fun twig(logMessage: String): Unit

Extension Functions

twig

Times a tiny log. Execute the block of code on the clock.

fun <R> Twig.twig(logMessage: String, block: () -> R): R

twigTask

A tiny log task. Execute the block of code with some twigging around the outside. For silent twigs, this adds a small amount of overhead at the call site but still avoids logging.

fun <R> Twig.twigTask(logMessage: String, block: () -> R): R