Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 1 addition & 13 deletions lib/fluent/plugin/out_file.rb
Original file line number Diff line number Diff line change
Expand Up @@ -189,13 +189,6 @@ def configure(conf)
@dir_perm = system_config.dir_permission || Fluent::DEFAULT_DIR_PERMISSION
@file_perm = system_config.file_permission || Fluent::DEFAULT_FILE_PERMISSION
@need_lock = system_config.workers > 1

# https://github.com/fluent/fluentd/issues/3569
@need_ruby_on_macos_workaround = false
if @append && Fluent.macos?
condition = Gem::Dependency.new('', [">= 2.7.0", "< 3.1.0"])
@need_ruby_on_macos_workaround = true if condition.match?('', RUBY_VERSION)
end
end

def multi_workers_ready?
Expand Down Expand Up @@ -244,12 +237,7 @@ def write(chunk)

def write_without_compression(path, chunk)
File.open(path, "ab", @file_perm) do |f|
if @need_ruby_on_macos_workaround
content = chunk.read()
f.puts content
else
chunk.write_to(f)
end
chunk.write_to(f)
end
end

Expand Down