struct Crylog::Logger
- Crylog::Logger
- Struct
- Value
- Object
Overview
A logger instance.
Defined in:
logger.crConstructors
-
.new(channel : String)
Creates a new
Logger
with the provided channel.
Instance Method Summary
-
#alert(&block : -> Crylog::MsgType) : Nil
Logs message and optionally context with
Crylog::Severity::Alert
severity. -
#alert(message, context : Crylog::LogContext? = nil) : Nil
Logs message and optionally context with
Crylog::Severity::Alert
severity. -
#channel : String
The channel
self
belongs to. -
#close
Closes each handler defined on
self
. -
#critical(&block : -> Crylog::MsgType) : Nil
Logs message and optionally context with
Crylog::Severity::Critical
severity. -
#critical(message, context : Crylog::LogContext? = nil) : Nil
Logs message and optionally context with
Crylog::Severity::Critical
severity. -
#debug(message, context : Crylog::LogContext? = nil) : Nil
Logs message and optionally context with
Crylog::Severity::Debug
severity. -
#debug(&block : -> Crylog::MsgType) : Nil
Logs message and optionally context with
Crylog::Severity::Debug
severity. -
#emergency(&block : -> Crylog::MsgType) : Nil
Logs message and optionally context with
Crylog::Severity::Emergency
severity. -
#emergency(message, context : Crylog::LogContext? = nil) : Nil
Logs message and optionally context with
Crylog::Severity::Emergency
severity. -
#error(&block : -> Crylog::MsgType) : Nil
Logs message and optionally context with
Crylog::Severity::Error
severity. -
#error(message, context : Crylog::LogContext? = nil) : Nil
Logs message and optionally context with
Crylog::Severity::Error
severity. -
#handlers : Array(Crylog::Handlers::LogHandler)
The handlers registered on
self
. -
#handlers=(handlers : Array(Crylog::Handlers::LogHandler)) : self
Sets the handlers to use for
self
. -
#info(&block : -> Crylog::MsgType) : Nil
Logs message and optionally context with
Crylog::Severity::Info
severity. -
#info(message, context : Crylog::LogContext? = nil) : Nil
Logs message and optionally context with
Crylog::Severity::Info
severity. -
#notice(message, context : Crylog::LogContext? = nil) : Nil
Logs message and optionally context with
Crylog::Severity::Notice
severity. -
#notice(&block : -> Crylog::MsgType) : Nil
Logs message and optionally context with
Crylog::Severity::Notice
severity. -
#processors : Array(Crylog::Processors::LogProcessors)
Processors registered on
self
. -
#processors=(processors : Array(Crylog::Processors::LogProcessors)) : self
Sets the processors to use for
self
. -
#warning(message, context : Crylog::LogContext? = nil) : Nil
Logs message and optionally context with
Crylog::Severity::Warning
severity. -
#warning(&block : -> Crylog::MsgType) : Nil
Logs message and optionally context with
Crylog::Severity::Warning
severity.
Constructor Detail
Instance Method Detail
Logs message and optionally context with Crylog::Severity::Alert
severity.
Block is only evaluated if the message is logged.
Logs message and optionally context with Crylog::Severity::Alert
severity.
Logs message and optionally context with Crylog::Severity::Critical
severity.
Block is only evaluated if the message is logged.
Logs message and optionally context with Crylog::Severity::Critical
severity.
Logs message and optionally context with Crylog::Severity::Debug
severity.
Logs message and optionally context with Crylog::Severity::Debug
severity.
Block is only evaluated if the message is logged.
Logs message and optionally context with Crylog::Severity::Emergency
severity.
Block is only evaluated if the message is logged.
Logs message and optionally context with Crylog::Severity::Emergency
severity.
Logs message and optionally context with Crylog::Severity::Error
severity.
Block is only evaluated if the message is logged.
Logs message and optionally context with Crylog::Severity::Error
severity.
Sets the handlers to use for self
.
Logs message and optionally context with Crylog::Severity::Info
severity.
Block is only evaluated if the message is logged.
Logs message and optionally context with Crylog::Severity::Info
severity.
Logs message and optionally context with Crylog::Severity::Notice
severity.
Logs message and optionally context with Crylog::Severity::Notice
severity.
Block is only evaluated if the message is logged.
Sets the processors to use for self
.
Logs message and optionally context with Crylog::Severity::Warning
severity.
Logs message and optionally context with Crylog::Severity::Warning
severity.
Block is only evaluated if the message is logged.