Skip to content

Commit

Permalink
Merge pull request #955 from okkez/suppress-encoding-warnings
Browse files Browse the repository at this point in the history
Suppress encoding related warnings
  • Loading branch information
tagomoris committed May 18, 2016
2 parents b35bfc5 + 32790dc commit 6f54dc3
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
1 change: 1 addition & 0 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ Rake::TestTask.new(:base_test) do |t|
t.test_files = Dir["test/**/test_*.rb"].sort
t.verbose = false
t.warning = false
t.ruby_opts = ["-Eascii-8bit:ascii-8bit"]
end

task :parallel_test do
Expand Down
4 changes: 0 additions & 4 deletions lib/fluent/engine.rb
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,6 @@ def init(system_config)
@system_config = system_config

BasicSocket.do_not_reverse_lookup = true
if defined?(Encoding)
Encoding.default_internal = 'ASCII-8BIT' if Encoding.respond_to?(:default_internal)
Encoding.default_external = 'ASCII-8BIT' if Encoding.respond_to?(:default_external)
end

suppress_interval(system_config.emit_error_log_interval) unless system_config.emit_error_log_interval.nil?
@suppress_config_dump = system_config.suppress_config_dump unless system_config.suppress_config_dump.nil?
Expand Down
6 changes: 4 additions & 2 deletions lib/fluent/supervisor.rb
Original file line number Diff line number Diff line change
Expand Up @@ -421,12 +421,14 @@ def supervise
$log.info "starting fluentd-#{Fluent::VERSION}"

if Fluent.windows?
fluentd_spawn_cmd = ServerEngine.ruby_bin_path + ' "' + $0.gsub('"', '""') + '" '
fluentd_spawn_cmd = ServerEngine.ruby_bin_path + " -Eascii-8bit:ascii-8bit "
fluentd_spawn_cmd << ' "' + $0.gsub('"', '""') + '" '
$fluentdargv.each{|a|
fluentd_spawn_cmd << ('"' + a.gsub('"', '""') + '" ')
}
else
fluentd_spawn_cmd = $0.shellescape + ' '
fluentd_spawn_cmd = ServerEngine.ruby_bin_path + " -Eascii-8bit:ascii-8bit "
fluentd_spawn_cmd << $0.shellescape + ' '
$fluentdargv.each{|a|
fluentd_spawn_cmd << (a.shellescape + " ")
}
Expand Down

0 comments on commit 6f54dc3

Please sign in to comment.