class LogCR::Logger

Overview

Logger class manages the configuration of the Logger

Defined in:

logcr.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(prefix : String, level : LogCR::LogLevel, format : LogCR::Format, output : IO = STDOUT) #

[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 format : LogCR::Format #

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

Create a new info log message


[View source]
def level : LogCR::LogLevel #

[View source]
def output : IO #

[View source]
def prefix : 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 the provided fields


[View source]