class Chef::Deployment::Monitor::Log
Public Class Methods
new(text, type = 'INFO')
click to toggle source
# File lib/chef_deployment_monitor/log.rb, line 22 def initialize(text, type = 'INFO') case type.downcase when 'INFO'.downcase puts '[' + Time.now.iso8601 + '] INFO: ' + text when 'WARN'.downcase puts '[' + Time.now.iso8601 + '] WARN: ' + text when 'ERROR'.downcase puts '[' + Time.now.iso8601 + '] ERROR: ' + text when 'DEBUG'.downcase puts '[' + Time.now.iso8601 + '] DEBUG: ' + text if DEBUG else puts '[' + Time.now.iso8601 + '] UNKNOWN: ' + text end end