struct Crylog::Handlers::IOHandler
- Crylog::Handlers::IOHandler
- Crylog::Handlers::ProcessingLogHandler
- Crylog::Handlers::AbstractLogHandler
- Crylog::Handlers::LogHandler
- Struct
- Value
- Object
Overview
Allows writing to any IO; files, STDOUT, etc.
Defined in:
handlers/io_handler.crConstructors
-
.new(io : IO, lock : Bool = false, severity : Crylog::Severity = Crylog::Severity::Debug, bubble : Bool = true)
Writes the message to the given io.
Instance Method Summary
-
#close : Nil
Closes io if it is a
File
. -
#write(message : Crylog::Message) : Nil
Writes message to the given io.
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.