[chef] chef client logging to syslog


Chronological Thread 
  • From: Sig Lange < >
  • To:
  • Subject: [chef] chef client logging to syslog
  • Date: Mon, 14 Sep 2009 08:58:54 -0700
  • Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=FCeIK1Mzd5cdAmCPkqVSoesuQDhsQ+aa3sgoR9x4TA5wxjYQ/dIYvSMeJ2WgFawONz 99b2q4C3lcN4dPGA+9yYgp8+otsj9IGTNJtm1+ny9aH6DJBiBjfbzrumhI1fXrgl27/6 W47oXNxYAqdLtoZjoa4HbFXkYbNDQIhF81d0c=

Syslog logger is at http://seattlerb.rubyforge.org/SyslogLogger/

install w/ gem
# gem install SyslogLogger

A "free" quick n dirty method to get chef-client (and chef-solo) to log syslog

gem install
Add the following to /etc/chef/client.rb (or solo.rb)

--- [ begin snip ] ---

require 'syslog_logger'
Chef::Log.logger = SyslogLogger.new("chef")

--- [ end snip ] ---

Ideally this would be a patch to chef-(solo|client) which could easily be configured *correctly.* but for immediate future, this fits the bill.

Cheers,
~ Sig



Archive powered by MHonArc 2.6.16.

§