Sha256: db60abdcb3c4bcd94da9f0da9e9d4e3cc828fc321f13fd5ba7cce417726d1f22

Contents?: true

Size: 296 Bytes

Versions: 6

Compression:

Stored size: 296 Bytes

Contents

module YogiBerra
  class Logger
    def self.log(log_string, level = :info)
      message = "[YogiBerra #{level.to_s.capitalize}] #{log_string}"
      if defined?(Rails) && Rails.logger
        Rails.logger.send(level, message)
      else
        $stderr.puts(message)
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
yogi_berra-0.2.1 lib/yogi_berra/logger.rb
yogi_berra-0.2.0 lib/yogi_berra/logger.rb
yogi_berra-0.1.7 lib/yogi_berra/logger.rb
yogi_berra-0.1.6 lib/yogi_berra/logger.rb
yogi_berra-0.1.4 lib/yogi_berra/logger.rb
yogi_berra-0.1.3 lib/yogi_berra/logger.rb