A SyslogOutputter transforms a Log4r::LogEvent into a call to syslog(). Since syslog has its own formatting system, log4r formatters are ignored.


To use,

  <tt>require 'log4r/outputter/syslogoutputter'</tt>

An example,

  require 'log4r'
  require 'log4r/outputter/syslogoutputter'

  syslog ="name", 'logopt'=>#, 'facility'=>#)
  syslog.err("this is an ERR message")

The output in /var/logs/syslog (Debian) is,

  Sep  3 11:43:06 tiphares sys[1603]: this is an ERR message

The hash arguments logoptions and facility are passed to The defaults are LOG_PID | LOG_CONS and LOG_USER respectively.

This is a first try implementation. It works well. Please report any bugs and fixes.


Generated with the Darkfish Rdoc Generator 1.1.6.