class LogCR::Logger
- LogCR::Logger
- Reference
- Object
Overview
Logger class manages the configuration of the Logger
Defined in:
logcr.crConstructors
Instance Method Summary
-
#debug(message : String, line = __LINE__, file = __FILE__) : String
Create a new debug log message
-
#error(message : String, line = __LINE__, file = __FILE__) : String
Create a new error log message
- #format : LogCR::Format
-
#info(message : String, line = __LINE__, file = __FILE__) : String
Create a new info log message
- #level : LogCR::LogLevel
- #output : IO
- #prefix : String
-
#warn(message : String, line = __LINE__, file = __FILE__) : String
Create a new warn log message
-
#with_fields(fields : Hash(String, String)) : LogCR::Entry
Create a new Log entry with the provided fields
Constructor Detail
def self.new(prefix : String, level : LogCR::LogLevel, format : LogCR::Format, output : IO = STDOUT)
#
Instance Method Detail
def debug(message : String, line = __LINE__, file = __FILE__) : String
#
Create a new debug log message
def error(message : String, line = __LINE__, file = __FILE__) : String
#
Create a new error log message
def info(message : String, line = __LINE__, file = __FILE__) : String
#
Create a new info log message
def warn(message : String, line = __LINE__, file = __FILE__) : String
#
Create a new warn log message
def with_fields(fields : Hash(String, String)) : LogCR::Entry
#
Create a new Log entry with the provided fields