Sha256: 4b83f1705328801480b58876c9f54150f475ee041e3a6de86f51646d489ddd14

Contents?: true

Size: 500 Bytes

Versions: 2

Compression:

Stored size: 500 Bytes

Contents

# logger functions
require 'colorize'

def _warn (message, header = 'WARNING')
  print "#{header}: ".yellow.bold
  puts message
end

def _success (message, header = 'SUCCESS')
  print "#{header}: ".green.bold
  puts message
end

def _error (message, header = 'ERROR')
  print "#{header}: ".red.bold
  puts message
end

def _debug (message, header = 'DEBUG')
  if ENV['DEBUG'] != 'true'
    return
  end

  print "#{header}: ".light_cyan.bold
  puts message
end

def _info (message)
  puts message
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
nando-1.1.0 lib/nando/logger.rb
nando-1.0.6 lib/nando/logger.rb