struct LogCR::Entry

Overview

Stores the data about a particular log entry and can be used to create a log message

Defined in:

logcr.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(message : String, fields : Hash(String, String), logger : LogCR::Logger) #

[View source]
def self.new(message : String, logger : LogCR::Logger) #

[View source]

Instance Method Detail

def debug(message : String, line = __LINE__, file = __FILE__) : String #

Create a new debug log message


[View source]
def error(message : String, line = __LINE__, file = __FILE__) : String #

Create a new error log message


[View source]
def fields : Hash(String, String) #

[View source]
def info(message : String, line = __LINE__, file = __FILE__) : String #

Create a new info log message


[View source]
def message : String #

[View source]
def warn(message : String, line = __LINE__, file = __FILE__) : String #

Create a new warn log message


[View source]
def with_fields(fields : Hash(String, String)) : LogCR::Entry #

Create a new log entry with these added fields


[View source]