Skip to content

Commit

Permalink
Merge pull request #215 from glennsarti/ticket/maint/add-debug
Browse files Browse the repository at this point in the history
(maint) Emit console messages when debugging is enabled
  • Loading branch information
Rob Braden authored Apr 4, 2017
2 parents f0f3504 + e04f380 commit e3cda9d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/vmpooler/logger.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ def log(_level, string)
time = Time.new
stamp = time.strftime('%Y-%m-%d %H:%M:%S')

puts "[#{stamp}] #{string}" if ENV['VMPOOLER_DEBUG']

open(@file, 'a') do |f|
f.puts "[#{stamp}] #{string}"
end
Expand Down

0 comments on commit e3cda9d

Please sign in to comment.