interface Twig
A tiny log.
plus |
Bundles twigs together open operator fun plus(twig: Twig): Twig |
twig |
Log the message. Simple. abstract fun twig(logMessage: String = ""): Unit |
clip |
Clip a leaf from the bush. Clipped leaves no longer appear in logs. fun clip(leaf: Leaf): Boolean |
plant |
Plants the twig, making it the one and only bush. Twigs can be bundled together to create the appearance of
multiple bushes (i.e fun plant(rootTwig: Twig): Unit |
prune |
Clip all leaves from the bush. fun prune(): Unit |
sprout |
Generate a leaf on the bush. Leaves show up in every log message as tags until they are clipped. fun sprout(leaf: Leaf): Boolean |
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 |
CompositeTwig |
Since there can only ever be one trunk on the bush of twigs, this class lets you cheat and make that trunk be a bundle of twigs. open class CompositeTwig : Twig |
SilentTwig |
A tiny log that does nothing. No one hears this twig fall in the woods. class SilentTwig : Twig |
TroubleshootingTwig |
A tiny log for detecting troubles. Aim at your troubles and pull the twigger. open class TroubleshootingTwig : Twig |