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 =
Supported severity names mapped to their filtering priority.
{ "debug" => 0, "info" => 1, "warn" => 2, "error" => 3 }.freeze
Class Method Summary collapse
-
.build(config, output: $stdout, clock: -> { Time.now.utc }) ⇒ Mammoth::Logging::Logger
Build the configured structured logger.
Class Method Details
.build(config, output: $stdout, clock: -> { Time.now.utc }) ⇒ Mammoth::Logging::Logger
Build the configured structured logger.
103 104 105 |
# File 'lib/mammoth/logging.rb', line 103 def build(config, output: $stdout, clock: -> { Time.now.utc }) Logger.new(level: config.dig("logging", "level") || "info", output:, clock:) end |