Created
September 4, 2012 04:05
-
-
Save mrtazz/3616423 to your computer and use it in GitHub Desktop.
send chef-client output to syslog
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.