Modifying the mcollective supports syslog output while modifying the default UTC time to local time.
Module mcollective module rpc # an audit plugin that just logs to a file # # You can configure which file it logs to with the setting # # plugin.rpcaudit.logfile class Logfile<Audit require ' pp ' require ' syslog ' def audit_request (Request, connection) logfile = config.instance.pluginconf["Rpcaudit.logfile"] | | "/var/log/mcollective-audit.log" now = Time.now.strftime ("%f %x") file.open (logfile, "a") do&nBsp;|f| f.puts ("[#{now}] reqid=#{ request.uniqid}: reqtime=#{request.time} caller=#{request.caller}@#{request.sender} agent=#{ Request.agent} action=#{request.action} data=#{request.data.pretty_print_inspect} ") end syslog.open (' Mcollective ', Syslog::log_pid,syslog::log_local4) do |f| f.log (Syslog::log_info, "[#{now}] reqid=#{request.uniqid}: reqtime=#{request.time} caller=#{request.caller}@#{request.sender} agent=#{request.agent} action=#{request.action} data=#{request.data.pretty_print_inspect} ") end end end endend
This article is from the "Xiaofeng Moon" blog, make sure to keep this source http://kinda22.blog.51cto.com/2969503/1587623
Modify Mcollective's audit support syslog