struct Crylog::Handlers::TestHandler

Overview

Keeps a record of all messages logged. Most useful for testing.

Used internaly to test Crylog::Handlers::ProcessingLogHandler and Crylog::Handlers::AbstractLogProcessor.

Defined in:

handlers/test_handler.cr

Instance Method Summary

Instance methods inherited from struct Crylog::Handlers::ProcessingLogHandler

handle(message : Crylog::Message) : Bool handle

Instance methods inherited from module Crylog::Processors::Processable

processors : Array(Crylog::Processors::LogProcessors) processors

Instance methods inherited from module Crylog::Formatters::Formattable

formatter : Crylog::Formatters::LogFormatters formatter, formatter=(formatter : Crylog::Formatters::LogFormatters?) formatter=

Instance methods inherited from struct Crylog::Handlers::AbstractLogHandler

bubble : Bool bubble, bubble=(bubble : Bool) bubble=, handles?(message : Crylog::Message) : Bool handles?, severity : Crylog::Severity severity, severity=(severity : Crylog::Severity) severity=

Constructor methods inherited from struct Crylog::Handlers::AbstractLogHandler

new(severity : Crylog::Severity = Crylog::Severity::Debug, bubble : Bool = true) new

Instance methods inherited from struct Crylog::Handlers::LogHandler

close close

Constructor methods inherited from struct Crylog::Handlers::LogHandler

new new

Instance Method Detail

def messages : Array(Crylog::Message) #

Array of messages handled by self.


[View source]
def write(message : Crylog::Message) : Nil #

Adds message to the array of handled messages.


[View source]