class LogStash::Outputs::Gcs::GzipLogFile
GzipLogFile
wraps another log file and writes events through it.
Attributes
fd[R]
Public Class Methods
new(child)
click to toggle source
# File lib/logstash/outputs/gcs/temp_log_file.rb, line 60 def initialize(child) @child = child @fd = Zlib::GzipWriter.new(child.fd) end
Public Instance Methods
close!()
click to toggle source
# File lib/logstash/outputs/gcs/temp_log_file.rb, line 74 def close! fsync # The Gzip writer closes the underlying IO after # appending the Gzip footer. @fd.close end
fsync()
click to toggle source
# File lib/logstash/outputs/gcs/temp_log_file.rb, line 69 def fsync @fd.flush @child.fsync end
method_missing(method_name, *args, &block)
click to toggle source
# File lib/logstash/outputs/gcs/temp_log_file.rb, line 81 def method_missing(method_name, *args, &block) @child.send(method_name, *args, &block) end
write(*contents)
click to toggle source
# File lib/logstash/outputs/gcs/temp_log_file.rb, line 65 def write(*contents) contents.each { |c| @fd.write(c) } end