Module: Klogger

Defined in:
lib/klogger/json_highlighter.rb,
lib/klogger.rb,
lib/klogger/colors.rb,
lib/klogger/logger.rb,
lib/klogger/version.rb,
lib/klogger/group_set.rb,
lib/klogger/formatters/go.rb,
lib/klogger/tagged_logger.rb,
lib/klogger/formatters/json.rb,
lib/klogger/formatters/simple.rb,
lib/klogger/formatters/abstract.rb

Overview

This class is responsible for receiving log data and sending it to an underlying

Defined Under Namespace

Modules: Colors, Formatters Classes: Abstract, GroupSet, JSONHighlighter, Logger, TaggedLogger

Constant Summary collapse

VERSION_FILE_ROOT =
File.expand_path('../../VERSION', __dir__)
VERSION =
'0.0.0.dev'

Class Method Summary collapse

Class Method Details

.global_groupsObject



12
13
14
# File 'lib/klogger.rb', line 12

def self.global_groups
  @global_groups ||= GroupSet.new
end

.group(**tags, &block) ⇒ Object



16
17
18
# File 'lib/klogger.rb', line 16

def self.group(**tags, &block)
  global_groups.call(**tags, &block)
end

.new(*args, **kwargs) ⇒ Object



8
9
10
# File 'lib/klogger.rb', line 8

def self.new(*args, **kwargs)
  Logger.new(*args, **kwargs)
end

.tagged(**tags, &block) ⇒ Object



20
21
22
# File 'lib/klogger.rb', line 20

def self.tagged(**tags, &block)
  global_groups.call_without_id(**tags, &block)
end