class Crylog::Message

Overview

Represents a logged message and its metadata.

Included Modules

Defined in:

message.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(pull : JSON::PullParser) #

[View source]
def self.new(severity : Crylog::Severity, channel : String, &block : -> Crylog::MsgType) #

[View source]

Instance Method Detail

def channel : String #

What channel the messaged was logged to.


[View source]
def context : Hash(String, Crylog::Context) #

Any extra metadata added when the message was logged.


[View source]
def context? : Bool #

[View source]
def datetime : Time #

When the message was logged.


[View source]
def extra : Hash(String, Crylog::Context) #

[View source]
def extra=(extra : Hash(String, Crylog::Context) | Nil) #

Any extra metadata added by a Crylog::Processors::LogProcessor.


[View source]
def extra? : Bool #

[View source]
def formatted : String #

[View source]
def formatted=(formatted : String) #

[View source]
def message : String #

The message that was logged.


[View source]
def message? : Bool #

[View source]
def severity : Severity #

The severity level of the logged message.


[View source]
def to_json(builder : JSON::Builder) #

[View source]