Skip to content

Commit

Permalink
fixed SIGUSR1 handler to force flush logs
Browse files Browse the repository at this point in the history
  • Loading branch information
frsyuki committed Feb 15, 2012
1 parent e1b7cf8 commit 2ca54e3
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
1 change: 0 additions & 1 deletion ChangeLog
Expand Up @@ -4,7 +4,6 @@ Release 0.10.12 - 2012/02/13
* Engine shows warnings when emitted record doesn't match any outputs
* in_tail is rewritten to follow symbolic links correctly
* out_forward uses independent default value as 'hard_timeout' parameter
*


Release 0.10.11 - 2012/02/10
Expand Down
2 changes: 1 addition & 1 deletion lib/fluent/engine.rb
Expand Up @@ -191,7 +191,7 @@ def flush_recursive(array)
m = m.output
end
if m.is_a?(BufferedOutput)
m.try_flush
m.force_flush
elsif m.is_a?(MultiOutput)
flush_recursive(m.outputs)
end
Expand Down
5 changes: 5 additions & 0 deletions lib/fluent/output.rb
Expand Up @@ -361,6 +361,11 @@ def try_flush
end
end

def force_flush
enqueue_buffer
submit_flush
end

def before_shutdown
begin
@buffer.before_shutdown(self)
Expand Down

0 comments on commit 2ca54e3

Please sign in to comment.