syslogio.rb

Path: lib/daemons/syslogio.rb
Last Update: Sat Feb 23 07:17:03 +0000 2019

This is a simple class meant to allow using syslog through an IO-like object. Code borrowed from github.com/phemmer/ruby-syslogio

The usage is simple:

    require 'syslogio'
    $stdout = SyslogIO.new("myapp", :local0, :info, $stdout)
    $stderr = SyslogIO.new("myapp", :local0, :err, $stderr)
    $stdout.puts "This is a message"
    $stderr.puts "This is an error"
    raise StandardError, 'This will get written through the SyslogIO for $stderr'

[Validate]