class Fluent::Plugin::SecondaryFileOutput
def write(chunk)
def write(chunk) path_without_suffix = extract_placeholders(@path_without_suffix, chunk) path = generate_path(path_without_suffix) FileUtils.mkdir_p File.dirname(path), mode: @dir_perm case @compress when :text File.open(path, "ab", @file_perm) {|f| f.flock(File::LOCK_EX) chunk.write_to(f) } when :gzip File.open(path, "ab", @file_perm) {|f| f.flock(File::LOCK_EX) gz = Zlib::GzipWriter.new(f) chunk.write_to(gz) gz.close } end path end