struct Crylog::Handlers::IOHandler

Overview

Allows writing to any IO; files, STDOUT, etc.

Defined in:

handlers/io_handler.cr

Constructors

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

Constructor Detail

def self.new(io : IO, lock : Bool = false, severity : Crylog::Severity = Crylog::Severity::Debug, bubble : Bool = true) #

Writes the message to the given io. If lock, and io is a file, locks the file before writing.


[View source]

Instance Method Detail

def close : Nil #

Closes io if it is a File.


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

Writes message to the given io.


[View source]