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

Suppress encoding related warnings #955

Merged
merged 2 commits into from
May 18, 2016

Conversation

okkez
Copy link
Contributor

@okkez okkez commented May 16, 2016

This change suppresses warning messages about 800 lines on CI.

lib/fluent/engine.rb:61: warning: setting Encoding.default_internal
lib/fluent/engine.rb:62: warning: setting Encoding.default_external
(about 400 times repeat)
lib/fluent/engine.rb:61: warning: setting Encoding.default_internal
lib/fluent/engine.rb:62: warning: setting Encoding.default_external

This change suppresses warning messages about 800 lines on CI.
@okkez
Copy link
Contributor Author

okkez commented May 16, 2016

We can treat data as binary when read it or open the file.
The data from Socket is always binary.

We are always careful with data from outside of Fluentd after merge this PR.

@tagomoris
Copy link
Member

I think just removing assignments of default_internal/external is breaking change for some cases, and it should NOT be done for compatibility.
IMO we have two options:

  • assigning encodings only when Encoding.default_* != Encoding::ASCII_8BIT
  • removing assignment for default encodings, and add specifying -E to command line arguments of spawn in supervisor.rb, and enable same thing on rake test

Second options is better for me. @repeatedly any thoughts?

@okkez
Copy link
Contributor Author

okkez commented May 16, 2016

In my local, I've tested second option. It works well on Linux and Windows.

@tagomoris
Copy link
Member

LGTM!

@tagomoris tagomoris merged commit 6f54dc3 into fluent:master May 18, 2016
@tagomoris
Copy link
Member

Merged. Thank you!

@okkez okkez deleted the suppress-encoding-warnings branch September 28, 2016 07:09
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