Sha256: 4c0f93a0ed30b75b4a00f798b76c682aef5e9fc8533252c5e1e0b80c92b024f0
Contents?: true
Size: 345 Bytes
Versions: 14
Compression:
Stored size: 345 Bytes
Contents
require 'json' class Alerty class Plugin class File def initialize(config) raise ConfigError.new('file: path is not configured') unless config.path @path = config.path end def alert(record) ::File.open(@path, 'a') do |io| io.puts record.to_json end end end end end
Version data entries
14 entries across 14 versions & 1 rubygems