Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix to add plugin instances created by MultiOutput plugins, into agents #1167

Merged
merged 2 commits into from
Aug 22, 2016

Conversation

tagomoris
Copy link
Member

MultiOutput plugins create plugin instances by themselves, but plugins' start/shutdown management are done by agents (kicked by RootAgent).
So these plugin instances must be pushed into agents.

This change fixes #1161.

@tagomoris tagomoris added bug Something isn't working v0.14 labels Aug 18, 2016
@tagomoris
Copy link
Member Author

@repeatedly Please review this change.

@@ -134,6 +134,9 @@ def add_match(type, pattern, conf)
output.router = @event_router if output.respond_to?(:router=)
output.configure(conf)
@outputs << output
if output.respond_to?(:outputs)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For safety, adding output.is_a?(Fluent::Plugin::MultiOutput) || output.is_a?(Fluent::MultiOutput) check is better.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed.

@tagomoris tagomoris force-pushed the multi-output-plugin-lifecycle branch from 70a9aae to d5b946f Compare August 22, 2016 10:57
@repeatedly
Copy link
Member

LGTM

@tagomoris tagomoris merged commit 495b52e into master Aug 22, 2016
@tagomoris tagomoris deleted the multi-output-plugin-lifecycle branch August 22, 2016 14:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working v0.14
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Error: "undefined method `+' for nil:NilClass" in plugin/output.rb
2 participants