class OrmDev::LogUtil
Constants
- ORMDEV_CLT_INFO_LOG_FLAG
Public Class Methods
debug(msg = '')
click to toggle source
# File lib/ormdev/source/util/log_util.rb, line 9 def self.debug(msg = '') puts msg end
info(msg = '')
click to toggle source
# File lib/ormdev/source/util/log_util.rb, line 13 def self.info(msg = '') puts "#{ORMDEV_CLT_INFO_LOG_FLAG}#{msg}" end
link(link, message)
click to toggle source
# File lib/ormdev/source/util/log_util.rb, line 17 def self.link(link, message) puts message unless message.nil? unless link.nil? puts " - " + link.blue.underlined if ENV["TERM_PROGRAM"] == "iTerm.app" puts " ( hold cmd and click links to open in a browser. )".magenta else puts " ( hold cmd and double click links to open in a browser. )".magenta end end end
print_command(content)
click to toggle source
# File lib/ormdev/source/util/log_util.rb, line 30 def self.print_command(content) puts content.green.bold end
print_error(content)
click to toggle source
# File lib/ormdev/source/util/log_util.rb, line 44 def self.print_error(content) puts '****************************************'.red puts "* #{Time.new} *".red puts '* *'.red puts '* Error ~ *'.red.bold puts '* *'.red puts content puts '****************************************'.red end
print_success(content)
click to toggle source
# File lib/ormdev/source/util/log_util.rb, line 34 def self.print_success(content) puts '****************************************'.green puts "* #{Time.new} *".green puts '* *'.green puts '* OK ~ *'.green.bold puts '* *'.green puts content puts '****************************************'.green end