Sha256: 0f465304481053fddd36a1147855efc4fa78f895022702835b7b9377f366b60c

Contents?: true

Size: 346 Bytes

Versions: 1

Compression:

Stored size: 346 Bytes

Contents

require 'redis'
require 'logster/redis_store'
require 'logster/message'
require 'json'

store = Logster::RedisStore.new(Redis.new)
latest = store.latest(limit:1000)

json = JSON.generate(latest)

path = File.expand_path('../../data/data.json', __FILE__)
File.open(path, 'w') {|f| f.write(json)}
puts "Wrote #{latest.count} messages into #{path}"

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
logster-0.0.1 website/scripts/persist_logs.rb