Sha256: 75f37fba405fe2736f43e982b60da263dc97128f3d4bd00e49b147a0a96773bf
Contents?: true
Size: 512 Bytes
Versions: 9
Compression:
Stored size: 512 Bytes
Contents
# Common code shared between both readers and writers. # module Syslogstash::Worker # If you ever want to stop a reader, here's how. def stop if @worker @worker.kill @worker.join @worker = nil end end def thread @worker end # If you want to wait for a reader to die, here's how. # def wait @worker.join end private def log $stderr.puts "[#{self.class}] #{yield.to_s}" end def debug if ENV['DEBUG_SYSLOGSTASH'] $stderr.puts "[#{self.class}] #{yield.to_s}" end end end
Version data entries
9 entries across 9 versions & 1 rubygems