class

Log::IOBackend

Inherits Log::Backend / Reference / Object

A Log::Backend that emits to an IO (defaults to STDOUT).

Constructors

new(io : IO = STDOUT, *, formatter : Formatter = ShortFormat, dispatcher : Dispatcher::Spec = DispatchMode::Async)
Source

Instance methods

format(entry : Entry) : Nil

Emits the entry to the given io. It uses the #formatter to convert.

Source
formatter
Source
formatter=(formatter : Formatter)
Source
io=(io : IO)
Source
write(entry : Entry) : Nil

Writes the entry to this backend.

Source