Sha256: 907e93863406122d041c166e83ce37d1508380731f86bedb7ce62ffde84dcf63

Contents?: true

Size: 364 Bytes

Versions: 23

Compression:

Stored size: 364 Bytes

Contents

require 'logger'
require 'delegate'
require 'singleton'

module PKGWizard
  OriginalLogger = Logger
  class Logger < SimpleDelegator
    include Singleton

    def initialize
      @logger = OriginalLogger.new(STDOUT)
      super @logger
    end
  end

  def set_output(log_device)
    @logger = OriginalLogger.new(log_device)
    __setobj__(@logger)
  end  

end

Version data entries

23 entries across 23 versions & 1 rubygems

Version Path
pkg-wizard-0.1.29 lib/pkg-wizard/logger.rb
pkg-wizard-0.1.28 lib/pkg-wizard/logger.rb
pkg-wizard-0.1.27 lib/pkg-wizard/logger.rb
pkg-wizard-0.1.26 lib/pkg-wizard/logger.rb
pkg-wizard-0.1.25 lib/pkg-wizard/logger.rb
pkg-wizard-0.1.24 lib/pkg-wizard/logger.rb
pkg-wizard-0.1.23 lib/pkg-wizard/logger.rb
pkg-wizard-0.1.22 lib/pkg-wizard/logger.rb
pkg-wizard-0.1.21 lib/pkg-wizard/logger.rb
pkg-wizard-0.1.19 lib/pkg-wizard/logger.rb
pkg-wizard-0.1.18 lib/pkg-wizard/logger.rb
pkg-wizard-0.1.17 lib/pkg-wizard/logger.rb
pkg-wizard-0.1.16 lib/pkg-wizard/logger.rb
pkg-wizard-0.1.15 lib/pkg-wizard/logger.rb
pkg-wizard-0.1.14 lib/pkg-wizard/logger.rb
pkg-wizard-0.1.12 lib/pkg-wizard/logger.rb
pkg-wizard-0.1.10 lib/pkg-wizard/logger.rb
pkg-wizard-0.1.8 lib/pkg-wizard/logger.rb
pkg-wizard-0.1.7 lib/pkg-wizard/logger.rb
pkg-wizard-0.1.6 lib/pkg-wizard/logger.rb