Module: KLog

Defined in:
lib/k_log.rb,
lib/k_log/logging.rb,
lib/k_log/version.rb,
lib/k_log/examples.rb,
lib/k_log/log_util.rb,
lib/k_log/log_helper.rb,
lib/k_log/log_formatter.rb,
lib/k_log/log_structure.rb,
lib/k_log/tools/build_formatter_configuration_for_log_structure.rb

Overview

Log Helper is an internal class that takes care of a lot of the formatting of different content types e.g key/values, lines, progress counters and headings it is different to the formatter because the formatter is used by Rails Logger to change the output stream style and format

Defined Under Namespace

Modules: Logging, Tools Classes: Error, Examples, LogFormatter, LogHelper, LogStructure, LogUtil

Constant Summary collapse

VERSION =
'0.0.33'

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.loggerObject

Returns the value of attribute logger.



18
19
20
# File 'lib/k_log.rb', line 18

def logger
  @logger
end

Class Method Details

.default_loggerObject



20
21
22
23
24
25
26
27
28
29
# File 'lib/k_log.rb', line 20

def default_logger
  return @default_logger if defined? @default_logger

  @default_logger = begin
    logger = Logger.new($stdout)
    logger.level = Logger::DEBUG
    logger.formatter = KLog::LogFormatter.new
    KLog::LogUtil.new(logger)
  end
end