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

Call formatter_create in #configure instead of #start in filter_stdout #1184

Conversation

cosmo0920
Copy link
Contributor

@cosmo0920 cosmo0920 changed the title Call formatter_create in #configure instead of #start Call formatter_create in #configure instead of #start in filter_stdout Aug 26, 2016
@@ -34,10 +34,10 @@ class StdoutFilter < Filter
def configure(conf)
compat_parameters_convert(conf, :inject, :formatter)
super
@formatter = formatter_create(conf: @config.elements('format').first, default_type: DEFAULT_FORMAT_TYPE)
end

def start
Copy link
Member

Choose a reason for hiding this comment

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

It's possible to remove whole #start because it's just calling super.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've removed this.

@tagomoris
Copy link
Member

LGTM

@tagomoris tagomoris merged commit 1f7719e into fluent:master Aug 27, 2016
@cosmo0920
Copy link
Contributor Author

Thanks!

@cosmo0920 cosmo0920 deleted the use-formatter-create-in-configure-filter_stdout branch August 27, 2016 03:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants