Class | MCollective::RPC::Logfile |
In: |
plugins/mcollective/audit/logfile.rb
|
Parent: | Audit |
An audit plugin that just logs to a file
You can configure which file it logs to with the setting
plugin.rpcaudit.logfile
# File plugins/mcollective/audit/logfile.rb, line 10 10: def audit_request(request, connection) 11: require 'pp' 12: 13: logfile = Config.instance.pluginconf["rpcaudit.logfile"] || "/var/log/mcollective-audit.log" 14: 15: File.open(logfile, "a") do |f| 16: f.puts("#{request.uniqid}: #{request.time} caller=#{request.caller}@#{request.sender} agent=#{request.agent} action=#{request.action}") 17: f.puts("#{request.uniqid}: #{request.data.pretty_print_inspect}") 18: end 19: end