class Crylog::Message
- Crylog::Message
- Reference
- Object
Overview
Represents a logged message and its metadata.
Included Modules
- JSON::Serializable
Defined in:
message.crConstructors
- .new(pull : JSON::PullParser)
- .new(severity : Crylog::Severity, channel : String, &block : -> Crylog::MsgType)
Instance Method Summary
-
#channel : String
What channel the messaged was logged to.
-
#context : Hash(String, Crylog::Context)
Any extra metadata added when the message was logged.
- #context? : Bool
-
#datetime : Time
When the message was logged.
- #extra : Hash(String, Crylog::Context)
-
#extra=(extra : Hash(String, Crylog::Context) | Nil)
Any extra metadata added by a
Crylog::Processors::LogProcessor
. - #extra? : Bool
- #formatted : String
- #formatted=(formatted : String)
-
#message : String
The message that was logged.
- #message? : Bool
-
#severity : Severity
The severity level of the logged message.
- #to_json(builder : JSON::Builder)
Constructor Detail
def self.new(severity : Crylog::Severity, channel : String, &block : -> Crylog::MsgType)
#
Instance Method Detail
def extra=(extra : Hash(String, Crylog::Context) | Nil)
#
Any extra metadata added by a Crylog::Processors::LogProcessor
.