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

Add Fluent::Log#<< #1478

Merged
merged 3 commits into from
Feb 21, 2017
Merged

Add Fluent::Log#<< #1478

merged 3 commits into from
Feb 21, 2017

Conversation

okkez
Copy link
Contributor

@okkez okkez commented Feb 21, 2017

This is useful for AWS related plugins to set Aws::XXX::Client's logger.
AWS logger requires #<< method.

See https://docs.aws.amazon.com/sdkforruby/api/Aws/S3/Client.html#initialize-instance_method

This is useful for AWS related plugins to set Aws::XXX::Client's logger.
AWS logger requires `#<<` method.

See https://docs.aws.amazon.com/sdkforruby/api/Aws/S3/Client.html#initialize-instance_method
test/test_log.rb Outdated
@@ -720,6 +720,10 @@ def test_write
@log.write("log")
end

def test_write_alias
assert { @log.respond_to?(:<<) }
Copy link
Member

Choose a reason for hiding this comment

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

Is {} needed? It seems assert @log.respond_to?(:<<) is enough.

@@ -357,6 +357,7 @@ def puts(msg)
def write(data)
@out.write(data)
end
alias << write
Copy link
Member

Choose a reason for hiding this comment

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

Please add comment why this alias is needed.

@repeatedly repeatedly merged commit 0886030 into fluent:master Feb 21, 2017
@okkez okkez deleted the add-log-concat-method branch February 22, 2017 02:25
repeatedly added a commit that referenced this pull request Mar 4, 2017
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