Method: Fluent::Plugin::FileOutput#write_gzip_with_compression
- Defined in:
- lib/fluent/plugin/out_file.rb
#write_gzip_with_compression(path, chunk) ⇒ Object
248 249 250 251 252 253 254 |
# File 'lib/fluent/plugin/out_file.rb', line 248 def write_gzip_with_compression(path, chunk) File.open(path, "ab", @file_perm) do |f| gz = Zlib::GzipWriter.new(f) chunk.write_to(gz, compressed: :text) gz.close end end |