Sha256: 9c695ec95f02a8d7179afb32b91e354266c76a4b3bfe02d1311a8c17d37f7752

Contents?: true

Size: 471 Bytes

Versions: 11

Compression:

Stored size: 471 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

11 entries across 11 versions & 1 rubygems

Version Path
iron_bank-2.2.0 lib/iron_bank/logger.rb
iron_bank-2.1.0 lib/iron_bank/logger.rb
iron_bank-2.0.2 lib/iron_bank/logger.rb
iron_bank-2.0.1 lib/iron_bank/logger.rb
iron_bank-2.0.0 lib/iron_bank/logger.rb
iron_bank-1.0.4 lib/iron_bank/logger.rb
iron_bank-1.0.3 lib/iron_bank/logger.rb
iron_bank-1.0.2 lib/iron_bank/logger.rb
iron_bank-1.0.1 lib/iron_bank/logger.rb
iron_bank-1.0.0 lib/iron_bank/logger.rb
iron_bank-0.7.1 lib/iron_bank/logger.rb