class BigKeeper::Logger

Public Class Methods

default(sentence) click to toggle source
# File lib/big_keeper/util/logger.rb, line 21
def self.default(sentence)
  puts formatter_output(sentence).colorize(:default)
end
error(sentence) click to toggle source
# File lib/big_keeper/util/logger.rb, line 29
def self.error(sentence)
  is_need_log = LeanCloudLogger.instance.is_need_log
  LeanCloudLogger.instance.end_log(false, is_need_log)
  raise formatter_output(sentence).colorize(:red)
end
formatter_output(sentence) click to toggle source
# File lib/big_keeper/util/logger.rb, line 43
def self.formatter_output(sentence)
  "[big] ".concat(sentence.to_s).to_s
end
highlight(sentence) click to toggle source
# File lib/big_keeper/util/logger.rb, line 25
def self.highlight(sentence)
  puts formatter_output(sentence).colorize(:green)
end
log_with_type(sentence,type) click to toggle source
# File lib/big_keeper/util/logger.rb, line 12
def self.log_with_type(sentence,type)
  case type
  when DEFAULT_LOG then puts sentence.to_s.colorize(:default)
  when HIGHLIGHT_LOG then puts sentence.to_s.colorize(:green)
  when ERROR_LOG then raise sentence.to_s.colorize(:red)
  when WARNING_LOG then puts sentence.to_s.colorize(:yellow)
  end
end
separator() click to toggle source
# File lib/big_keeper/util/logger.rb, line 39
def self.separator
  puts "- - - - - - - - - - - - - - - - - - - - - - - - - - -".colorize(:light_blue)
end
warning(sentence) click to toggle source
# File lib/big_keeper/util/logger.rb, line 35
def self.warning(sentence)
  puts formatter_output(sentence).colorize(:yellow)
end