Module: Mammoth::Logging

Defined in:
lib/mammoth/logging.rb

Overview

Container-friendly structured application logging.

Defined Under Namespace

Classes: Logger, NullLogger

Constant Summary collapse

LEVELS =
{ "debug" => 0, "info" => 1, "warn" => 2, "error" => 3 }.freeze

Class Method Summary collapse

Class Method Details

.build(config, output: $stdout, clock: -> { Time.now.utc }) ⇒ Object



56
57
58
# File 'lib/mammoth/logging.rb', line 56

def build(config, output: $stdout, clock: -> { Time.now.utc })
  Logger.new(level: config.dig("logging", "level") || "info", output:, clock:)
end