I tried Scott Hain's configuration, and it works on Chef Client 12:On Mon, 8 Dec 2014, Jeff Blaine wrote:
On 12/8/2014 2:54 PM, William Jimenez wrote:
Hello
I'm trying to configure chef-client to log to syslog, as mentioned
here: https://github.com/opscode-cookbooks/chef-client#configuration-includes,
however when I use that config I get the following error:
[2014-12-08T19:43:54+00:00] FATAL: Failed to open or create log file at #
<Logger::Syslog:0x00000002ee6e50>: TypeError (can't convert
Logger::Syslog into String)
[2014-12-08T19:43:54+00:00] FATAL: Aborting due to invalid
'log_location' configuration
I'm wondering what environments this works on. I'm running chef
client 11.16.4.
William, maybe try this:
https://supermarket.chef.io/cookbooks/chef-client_syslog
My last comment at this epic blog post of mine is at the top:
"UPDATE: THE FOLLOWING BLOG POST IS KEPT FOR HISTORICAL PURPOSES ONLY.
The solution at the end of the post no longer works and I give up
chasing this elusive dream. Readers may want to look into this instead:
https://supermarket.getchef.com/cookbooks/chef-client_syslog"
require 'syslog-logger'
Chef::Log.use_log_devices( [ Logger::Syslog.new("chef-client", Syslog::LOG_LOCAL7) ] )
Put that in /etc/chef/client.rb (after installing the syslog-logger gem into Chef's Ruby).
- Julian
[ Julian C. Dunn < " target="_blank"> > * Sorry, I'm ]
[ WWW: http://www.aquezada.com/staff/julian * only Web 1.0 ]
[ gopher://sdf.org/1/users/keymaker/ * compliant! ]
[ PGP: 91B3 7A9D 683C 7C16 715F 442C 6065 D533 FDC2 05B9 ]
Archive powered by MHonArc 2.6.16.