Logbook
abstract class Logbook(normalizeName: NameNormalizer = defaultNameNormalizer) : Colorable, CanFormat, HasOutlets(source)
Base class for all logbooks.
Usage
To create your own logbook, create a subclass of Logbook. You can make it an object, but it is recommended to use the following pattern:
abstract class MyLog : Logbook() {
companion object : MyLog()
}
Content copied to clipboard
This way, you can create another logger that inherits from your base logger:
abstract class MySpecificLog : MyLog() {
companion object : MySpecificLog()
}
Content copied to clipboard
Note
The Logbook class itself comes with the most minimal configuration possible, probably too minimal for you. For this reason, you can choose to use Logbook.WithDefaults instead, which comes preconfigured with four LogLevels – each set up with an AnsiConsoleOutlet – a nice format, and a randomized name color so you can tell different loggers apart. See Logbook.WithDefaults for more info.