Skip to content

Commit

Permalink
Add detach_process and detach_multi_process for backward compatibility
Browse files Browse the repository at this point in the history
Because some 3rd party plugins use these methods in their code:

```ruby
class HTTPServer # w/o inheriting Fluent::Input, Fluent::Output
  include DetachMultiProcess

  def start
    detach_multi_process do
      # Do something to run HTTP server
    end
  end
end
```
  • Loading branch information
okkez committed Mar 30, 2017
1 parent 73dbe4b commit 5e021a7
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions lib/fluent/compat/detach_process_mixin.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,17 @@
module Fluent
module Compat
module DetachProcessMixin
def detach_process
log.warn "#{__method__} is not supported in this version. ignored."
yield
end
end

module DetachMultiProcessMixin
def detach_multi_process
log.warn "#{__method__} is not supported in this version. ignored."
yield
end
end
end
end

0 comments on commit 5e021a7

Please sign in to comment.