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 warn_for_delay tests for v0.14 #154

Merged
merged 1 commit into from
Jun 30, 2016

Conversation

sonots
Copy link
Member

@sonots sonots commented Jun 30, 2016

v0.14 TestLogger currently outputs as:

2011-01-03 13:07:36 +0000 [warn]: [] out_s3: delayed events were put

This fix is just to avoid such diff.

FYI: v0.14 TestLogger tries to add optional_header like [#{self.class.name}]

From: fluent/fluentd/lib/fluent/log.rb @ line 426 Fluent::PluginLoggerMixin#configure:

    422: def configure(conf)
    423:   super

    428:   if level = conf['@log_level']
    429:     unless @log.is_a?(PluginLogger)
    430:       @log = PluginLogger.new($log.dup)
    431:     end
    432:     @log.level = level
    433:     @log.optional_header = "[#{self.class.name}#{plugin_id_configured? ? "(" + @id + ")" : ""}] "
    434:     @log.optional_attrs = {}
    435:   end
    436: end

but, TestDriver creates plugin instance with Class.new, therefore, it does not have class name. This is reason why we get the extra [] on v0.14

@repeatedly
Copy link
Member

Thx!

@sonots sonots deleted the fix_warn_for_delay_test branch June 30, 2016 17:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants