Method: Ufo::Stop#log

Defined in:
lib/ufo/stop.rb

#log(text) ⇒ Object



40
41
42
43
44
45
46
47
# File 'lib/ufo/stop.rb', line 40

def log(text)
  path = "#{Ufo.root}/.ufo/log/stop.log"
  FileUtils.mkdir_p(File.dirname(path))
  File.open(path, 'a') do |f|
    f.puts("#{Time.now} #{text}")
  end
  puts text unless @options[:mute]
end