Make logging cheaper in the non-verbose case
This commit is contained in:
parent
03abf83472
commit
bbf79f5d85
@ -538,9 +538,16 @@ class Formula
|
||||
File.open(logfn, 'w') do |f|
|
||||
f.puts Time.now, "", cmd, args, ""
|
||||
|
||||
while buf = rd.gets
|
||||
f.puts buf
|
||||
puts buf if ARGV.verbose?
|
||||
if ARGV.verbose?
|
||||
while buf = rd.gets
|
||||
f.puts buf
|
||||
puts buf
|
||||
end
|
||||
elsif IO.respond_to?(:copy_stream)
|
||||
IO.copy_stream(rd, f)
|
||||
else
|
||||
buf = ""
|
||||
f.write(buf) while rd.read(1024, buf)
|
||||
end
|
||||
|
||||
Process.wait(pid)
|
||||
|
Loading…
x
Reference in New Issue
Block a user