withThreadName

Creates a new logger that decorates messages with the name of the thread where the log was invoked.

Example usage:

val logger = consoleLogger.withThreadName()
logger.log("Doing work") // Prints: Doing work (on main thread)

Return

A new Logger instance that adds thread information to each message.