class LogStash::Outputs::Qingstor::RotationPolicy::Size

Public Class Methods

new(file_size, _) click to toggle source
# File lib/logstash/outputs/qingstor/rotation_policy.rb, line 42
def initialize(file_size, _)
  @file_size = file_size
  positive_check(@file_size)
end

Public Instance Methods

needs_periodic?() click to toggle source
# File lib/logstash/outputs/qingstor/rotation_policy.rb, line 51
def needs_periodic?; false; end
rotate?(file) click to toggle source
# File lib/logstash/outputs/qingstor/rotation_policy.rb, line 47
def rotate?(file)
  file.size >= @file_size
end
to_s() click to toggle source
# File lib/logstash/outputs/qingstor/rotation_policy.rb, line 53
def to_s
  { :policy => name, :file_size => @file_size }.to_s
end