Skip to content

Instantly share code, notes, and snippets.

@mrtazz
Created September 4, 2012 04:05
  • Star 4 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save mrtazz/3616423 to your computer and use it in GitHub Desktop.
send chef-client output to syslog
require 'rubygems'
require 'syslog-logger'
log_level :info
Logger::Syslog.class_eval do
attr_accessor :sync, :formatter
end
log_location Logger::Syslog.new("chef-client")
@sacx
Copy link

sacx commented Jul 11, 2013

Debian users:

If you installed chef from apt.opscode.com repository,don't forget to comment out LOGFILE from /etc/default/chef-client to work. If not, this syslog solution will not work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment