Sha256: c3304bc80a8cd899969ab73fe70c0902a4cda9fa912b3f682dd0da949050a0ca
Contents?: true
Size: 255 Bytes
Versions: 9
Compression:
Stored size: 255 Bytes
Contents
require "json" fh = File.new(config[:file] || raise("must have filename"), 'a') ->(metric) { # TODO handle failed writes / disk full? fh.puts "#{Time.now.to_i} #{JSON.generate(metric)}" # TODO flush on timer / only log once per second? fh.flush }
Version data entries
9 entries across 9 versions & 1 rubygems