Class: ElasticLogger::ElkRotator

Inherits:
Object
  • Object
show all
Defined in:
lib/elastic-logger/elk_rotator.rb

Instance Method Summary collapse

Instance Method Details

#rotateObject



6
7
8
9
10
11
# File 'lib/elastic-logger/elk_rotator.rb', line 6

def rotate
  logs.each do |name, value|
    hash = value.select { |k,v| keys.include?(k) }
    client.index(index: index, type: index, id: name, body: hash)
  end
end