Sha256: 9fcf2e0b56825f18cfa498d1f449721a73c6b004e828923d0724d71ee3d85ac7

Contents?: true

Size: 325 Bytes

Versions: 13

Compression:

Stored size: 325 Bytes

Contents

require 'logger'

module Percy
  def self.logger
    return @logger if defined?(@logger)

    @logger ||= Logger.new(STDOUT)
    @logger.level = Logger::INFO if ENV['PERCY_ENV'] == 'production'
    @logger.formatter = proc do |severity, _datetime, _progname, msg|
      "[#{severity}] #{msg}\n"
    end
    @logger
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
percy-common-3.1.9 lib/percy/logger.rb
percy-common-3.1.8 lib/percy/logger.rb
percy-common-3.1.7.pre.beta lib/percy/logger.rb
percy-common-3.1.6 lib/percy/logger.rb
percy-common-3.1.5 lib/percy/logger.rb
percy-common-3.1.4 lib/percy/logger.rb
percy-common-3.1.3 lib/percy/logger.rb
percy-common-3.1.2 lib/percy/logger.rb
percy-common-3.1.2.pre.rc.3 lib/percy/logger.rb
percy-common-3.1.2.pre.rc.2 lib/percy/logger.rb
percy-common-3.1.2.rc.1 lib/percy/logger.rb
percy-common-3.1.1 lib/percy/logger.rb
percy-common-3.1.0 lib/percy/logger.rb