summaryrefslogtreecommitdiff
path: root/rubyfy.rb
diff options
context:
space:
mode:
Diffstat (limited to 'rubyfy.rb')
-rwxr-xr-xrubyfy.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/rubyfy.rb b/rubyfy.rb
index 53ce88f..1df9097 100755
--- a/rubyfy.rb
+++ b/rubyfy.rb
@@ -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