Module: Djinn::Base::Logging

Included in:
Djinn::Base
Defined in:
lib/djinn/base/logging.rb

Overview

Logging Helper Class of Awesomeness

Instance Method Summary collapse

Instance Method Details

#cyan(text) ⇒ Object

Make some text cyan



23
24
25
# File 'lib/djinn/base/logging.rb', line 23

def cyan text
  colorize 36, text
end

#green(text) ⇒ Object

Make some text green



13
14
15
# File 'lib/djinn/base/logging.rb', line 13

def green text
  colorize 32, text
end

#log(msg) ⇒ Object

Log something to STDOUT, or wherever it’s been redirected to



7
8
9
10
# File 'lib/djinn/base/logging.rb', line 7

def log msg
  puts "#{Time.now.strftime("%m/%d/%Y %H:%M:%S")}: #{msg}"
  STDOUT.flush
end

#red(text) ⇒ Object

Make some text red



18
19
20
# File 'lib/djinn/base/logging.rb', line 18

def red text
  colorize 31, text
end