Class: OrmDev::LogUtil
- Inherits:
-
Object
- Object
- OrmDev::LogUtil
- Defined in:
- lib/ormdev/source/util/log_util.rb
Constant Summary collapse
- ORMDEV_CLT_INFO_LOG_FLAG =
'[OrmDev]'
Class Method Summary collapse
- .debug(msg = '') ⇒ Object
- .info(msg = '') ⇒ Object
- .print_command(content) ⇒ Object
- .print_error(content) ⇒ Object
- .print_success(content) ⇒ Object
Class Method Details
.debug(msg = '') ⇒ Object
9 10 11 |
# File 'lib/ormdev/source/util/log_util.rb', line 9 def self.debug(msg = '') puts msg end |
.info(msg = '') ⇒ Object
13 14 15 |
# File 'lib/ormdev/source/util/log_util.rb', line 13 def self.info(msg = '') puts "#{ORMDEV_CLT_INFO_LOG_FLAG}#{msg}" end |
.print_command(content) ⇒ Object
17 18 19 |
# File 'lib/ormdev/source/util/log_util.rb', line 17 def self.print_command(content) puts content.green.bold end |
.print_error(content) ⇒ Object
31 32 33 34 35 36 37 38 39 |
# File 'lib/ormdev/source/util/log_util.rb', line 31 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) ⇒ Object
21 22 23 24 25 26 27 28 29 |
# File 'lib/ormdev/source/util/log_util.rb', line 21 def self.print_success(content) puts '****************************************'.green puts "* #{Time.new} *".green puts '* *'.green puts '* OK ~ *'.green.bold puts '* *'.green puts content puts '****************************************'.green end |