class LogStash::Outputs::Swift::SizeRotationPolicy

Attributes

size_file[R]

Public Class Methods

new(size_file) click to toggle source
# File lib/logstash/outputs/swift/size_rotation_policy.rb, line 8
def initialize(size_file)
  if size_file <= 0
    raise LogStash::ConfigurationError, "`size_file` need to be greather than 0"
  end

  @size_file = size_file
end

Public Instance Methods

needs_periodic?() click to toggle source
# File lib/logstash/outputs/swift/size_rotation_policy.rb, line 20
def needs_periodic?
  false
end
rotate?(file) click to toggle source
# File lib/logstash/outputs/swift/size_rotation_policy.rb, line 16
def rotate?(file)
  file.size >= size_file
end