lib/sawmill/entry_processor/format.rb in sawmill-0.0.9 vs lib/sawmill/entry_processor/format.rb in sawmill-0.0.10
- old
+ new
@@ -93,10 +93,11 @@
def begin_record(entry_)
return false unless @io || @rotater
record_id_ = entry_.record_id
if @rotater
if @standby_channel
+ @standby_channel.check_rotate
io_ = @standby_channel
@standby_channel = nil
else
io_ = @rotater.create_channel
end
@@ -166,11 +167,11 @@
io_ = @channels[record_id_]
if io_
io_.write(str_)
else
@standby_channel ||= @rotater.create_channel
- @standby_channel.write(str_)
@standby_channel.check_rotate
+ @standby_channel.write(str_)
end
else
@io.write(str_)
end
end