Class: Rancher::Shell::Logger

Inherits:
Object
  • Object
show all
Defined in:
lib/rancher/shell/logger.rb

Instance Method Summary collapse

Instance Method Details

#debug(message) ⇒ Object



4
5
6
# File 'lib/rancher/shell/logger.rb', line 4

def debug message
  $stdout.puts "[#{DateTime.now.strftime '%Y-%m-%d %H:%M:%S'}] DEBUG -- : #{message}"
end

#error(message) ⇒ Object



12
13
14
# File 'lib/rancher/shell/logger.rb', line 12

def error message
  $stderr.puts "[#{DateTime.now.strftime '%Y-%m-%d %H:%M:%S'}] ERROR -- : #{message}"
end

#info(message) ⇒ Object



8
9
10
# File 'lib/rancher/shell/logger.rb', line 8

def info message
  $stdout.puts "[#{DateTime.now.strftime '%Y-%m-%d %H:%M:%S'}]  INFO -- : #{message}"
end

#out(message) ⇒ Object



20
21
22
# File 'lib/rancher/shell/logger.rb', line 20

def out message
  $stdout.puts "[#{DateTime.now.strftime '%Y-%m-%d %H:%M:%S'}]       -- : #{message}"
end

#warn(message) ⇒ Object



16
17
18
# File 'lib/rancher/shell/logger.rb', line 16

def warn message
  $stderr.puts "[#{DateTime.now.strftime '%Y-%m-%d %H:%M:%S'}]  WARN -- : #{message}"
end