Sha256: 5cddceffe50804fbf978246b8223ce489f6a7830acbec3dd5b404a65ce731d74

Contents?: true

Size: 428 Bytes

Versions: 9

Compression:

Stored size: 428 Bytes

Contents

require 'logger'
require 'forwardable'

module Pickpocket
  class Logger
    extend SingleForwardable

    @logger           = ::Logger.new(STDOUT)
    @logger.level     = ::Logger::INFO
    @logger.formatter = proc do |_severity, _datetime, _progname, msg|
      %Q{[Pickpocket] #{msg}\n}
    end

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

    def self.logger=(logger)
      @logger = logger
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
pick-pocket-0.2.4 lib/pickpocket/logger.rb
pick-pocket-0.2.3 lib/pickpocket/logger.rb
pick-pocket-0.2.2 lib/pickpocket/logger.rb
pick-pocket-0.2.1 lib/pickpocket/logger.rb
pick-pocket-0.2.0 lib/pickpocket/logger.rb
pick-pocket-0.1.2 lib/pickpocket/logger.rb
pick-pocket-0.1.1 lib/pickpocket/logger.rb
pick-pocket-0.1.0 lib/pickpocket/logger.rb
pick-pocket-0.0.3 lib/pickpocket/logger.rb