- From: Eric-Olivier Lamey <
>
- To:
- Subject: [chef] Re: Logging to syslog
- Date: Tue, 19 Jul 2011 18:16:07 +0200
On Tue, Jul 19, 2011 at 3:13 PM, Oliver Beattie
<
>
wrote:
>
I see from the documentation
>
(http://wiki.opscode.com/display/chef/Chef+Configuration+Settings#ChefConfigurationSettings-logoutput)
>
that it is possible to log to syslog, but the link that I guess is supposed
>
to explain how to do so is broken. I'm afraid I'm not a Ruby person so,
>
while I realise the config file is just Ruby and it's probably a simple task
>
to do so, I'm not entirely sure how to do it without a pointer or two, and
>
this is functionality I couldn't use Chef without (we have to have all our
>
logs centralised, which obviously is fairly easy to take care of when using
>
syslog).
Hi,
I had a look a while ago and had to dig a little bit to find the
solution. I don't have
access to the system I configured right now but, if I remember correctly,
you
have to install the SyslogLogger gem and then modify /etc/chef/client.rb or
server.rb to add:
require 'syslog_logger'
log_location SyslogLogger.new("chef-client")
If you are using the supplied startup scripts for RedHat-base
distributions, please
note that they insist on configuring the logger in
/etc/sysconfig/chef-{client,server}.
You might have to manually modify the startup script for the logging to work
as intended.
Archive powered by MHonArc 2.6.16.