Sha256: a15639490287d1cdd3a1872044ab0426322fb48f6a1463057abf7fa6db6e8c5a

Contents?: true

Size: 472 Bytes

Versions: 9

Compression:

Stored size: 472 Bytes

Contents

# frozen_string_literal: true

require "singleton"
require "logger"

module IronBank
  # Default logger for IronBank events
  #
  class Logger
    extend Forwardable

    PROGNAME = "iron_bank"
    LEVEL    = ::Logger::DEBUG

    def_delegators :@logger, :debug, :info, :warn, :error, :fatal

    def initialize(logger: ::Logger.new($stdout), level: LEVEL)
      @logger          = logger
      @logger.progname = PROGNAME
      @logger.level    = level
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
iron_bank-5.4.1 lib/iron_bank/logger.rb
iron_bank-5.4.0 lib/iron_bank/logger.rb
iron_bank-5.3.2 lib/iron_bank/logger.rb
iron_bank-5.3.0 lib/iron_bank/logger.rb
iron_bank-5.2.6 lib/iron_bank/logger.rb
iron_bank-5.2.4 lib/iron_bank/logger.rb
iron_bank-5.2.3 lib/iron_bank/logger.rb
iron_bank-5.2.0 lib/iron_bank/logger.rb
iron_bank-5.1.1 lib/iron_bank/logger.rb