Sha256: 06a5f47cfbd46d156dfc38863f0d7b6313905aa2721dc1711b64d9e41a879daa

Contents?: true

Size: 1.12 KB

Versions: 13

Compression:

Stored size: 1.12 KB

Contents

require 'date'
require 'logger'

module OrmDev
  class LogUtil

    ORMDEV_CLT_INFO_LOG_FLAG = '[OrmDev]'

    def self.debug(msg = '')
      puts msg
    end

    def self.info(msg = '')
      puts "#{ORMDEV_CLT_INFO_LOG_FLAG}#{msg}"
    end

    def self.print_command(content)
      puts content.green.bold
    end

    def self.print_success(content)
      puts '****************************************'.green
      puts "*    #{Time.new}         *".green
      puts '*                                      *'.green
      puts '*                 OK ~                 *'.green.bold
      puts '*                                      *'.green
      puts content
      puts '****************************************'.green
    end

    def self.print_error(content)
      puts '****************************************'.red
      puts "*    #{Time.new}         *".red
      puts '*                                      *'.red
      puts '*               Error ~                *'.red.bold
      puts '*                                      *'.red
      puts content
      puts '****************************************'.red
    end

  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
ormdev-0.1.5 lib/ormdev/source/util/log_util.rb
ormdev-0.1.4 lib/ormdev/source/util/log_util.rb
ormdev-0.1.3 lib/ormdev/source/util/log_util.rb
ormdev-0.1.2 lib/ormdev/source/util/log_util.rb
ormdev-0.1.1 lib/ormdev/source/util/log_util.rb
ormdev-0.1.0 lib/ormdev/source/util/log_util.rb
ormdev-0.0.9 lib/ormdev/source/util/log_util.rb
ormdev-0.0.8 lib/ormdev/source/util/log_util.rb
ormdev-0.0.7 lib/ormdev/source/util/log_util.rb
ormdev-0.0.6 lib/ormdev/source/util/log_util.rb
ormdev-0.0.5 lib/ormdev/source/util/log_util.rb
ormdev-0.0.4 lib/ormdev/source/util/log_util.rb
ormdev-0.0.3 lib/ormdev/source/util/log_util.rb