Sha256: 86ff22700ec381e11802ebcc04099812d069b2fc86a7eb108f2e7a104eeb1f0a

Contents?: true

Size: 465 Bytes

Versions: 47

Compression:

Stored size: 465 Bytes

Contents

# frozen_string_literal: true

module Ridgepole
  class Logger < ::Logger
    include Singleton
    cattr_accessor :verbose

    def initialize
      super($stdout)

      self.formatter = proc do |_severity, _datetime, _progname, msg|
        "#{msg}\n"
      end

      self.level = Logger::INFO
    end

    def verbose_info(msg)
      info(msg) if verbose
    end

    def debug=(value)
      self.level = value ? Logger::DEBUG : Logger::INFO
    end
  end
end

Version data entries

47 entries across 47 versions & 1 rubygems

Version Path
ridgepole-1.0.1 lib/ridgepole/logger.rb
ridgepole-1.0.0 lib/ridgepole/logger.rb
ridgepole-0.9.6 lib/ridgepole/logger.rb
ridgepole-0.9.5 lib/ridgepole/logger.rb
ridgepole-0.9.4 lib/ridgepole/logger.rb
ridgepole-0.9.3 lib/ridgepole/logger.rb
ridgepole-0.9.2 lib/ridgepole/logger.rb
ridgepole-0.9.1 lib/ridgepole/logger.rb
ridgepole-0.9.0 lib/ridgepole/logger.rb
ridgepole-0.8.13 lib/ridgepole/logger.rb
ridgepole-0.9.0.rc1 lib/ridgepole/logger.rb
ridgepole-0.9.0.beta lib/ridgepole/logger.rb
ridgepole-0.8.12 lib/ridgepole/logger.rb
ridgepole-0.8.11 lib/ridgepole/logger.rb
ridgepole-0.8.10 lib/ridgepole/logger.rb
ridgepole-0.8.9 lib/ridgepole/logger.rb
ridgepole-0.8.8 lib/ridgepole/logger.rb
ridgepole-0.8.7 lib/ridgepole/logger.rb
ridgepole-0.8.6 lib/ridgepole/logger.rb
ridgepole-0.8.5 lib/ridgepole/logger.rb