Sha256: 30f5fc6b55804734203eb078b84246e9623a258f7fa3271d6026db6ea3cb9c35
Contents?: true
Size: 587 Bytes
Versions: 1
Compression:
Stored size: 587 Bytes
Contents
# encoding: utf-8 require "logstash/outputs/swift/size_rotation_policy" require "logstash/outputs/swift/time_rotation_policy" module LogStash module Outputs class Swift class SizeAndTimeRotationPolicy def initialize(file_size, time_file) @size_strategy = SizeRotationPolicy.new(file_size) @time_strategy = TimeRotationPolicy.new(time_file) end def rotate?(file) @size_strategy.rotate?(file) || @time_strategy.rotate?(file) end def needs_periodic? true end end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
logstash-output-swift-0.1 | lib/logstash/outputs/swift/size_and_time_rotation_policy.rb |