diff options
| author | Paul Buetow (uranus) <paul@buetow.org> | 2015-10-28 09:31:41 +0000 |
|---|---|---|
| committer | Paul Buetow (uranus) <paul@buetow.org> | 2015-10-28 09:31:41 +0000 |
| commit | 87558274acaefdb852b4f62a09f78bd642de0316 (patch) | |
| tree | e4bde5fb2ee1cba7638c39ca6c5994105e05aa40 /rubyfy.rb | |
| parent | 34cdf6c8b15677a63002ebbf29125defccbf9ade (diff) | |
overwrite outfile on every new run
Diffstat (limited to 'rubyfy.rb')
| -rwxr-xr-x | rubyfy.rb | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -16,6 +16,7 @@ class Rubyfy @conf = Hash.new @log_mutex = Mutex.new @outfile = nil + @outfile_mode = "w" opts.each do |opt, arg| opt.sub!(/^-+/, '') @@ -191,8 +192,9 @@ private @log_mutex.synchronize do puts message if @outfile and severity != :STDOUTONLY - open(@outfile, "a") do |f| + open(@outfile, @outfile_mode) do |f| f.puts message + @outfile_mode = "a" end end end |
