Skip to content

class Log::IOBackend
inherits Log::Backend

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

Class methods

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

View source

Methods

#format(entry : Entry)

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

View source

#formatter : Formatter

View source

#formatter=(formatter : Formatter)

View source

#io : IO

View source

#io=(io : IO)

View source

#write(entry : Entry)

Writes the entry to this backend.

View source