lib/rundock/plugin/hook/file.rb in rundock-0.4.8 vs lib/rundock/plugin/hook/file.rb in rundock-0.4.10
- old
+ new
@@ -30,12 +30,12 @@
# port: 22
# user: anyuser
# key: ~/.ssh/id_rsa
# ---
class File < Base
- def hook(log_buffer, node_info)
+ def hook(node_attributes, log_buffer)
file = ::File.open(@contents[:filepath], 'w')
- file.puts("[hookname:#{@name} node:#{node_info[:host]}]")
+ file.puts("[hookname:#{@name} node:#{node_attributes[0][:nodename]}]")
log_buffer.each do |log|
file.puts("[\%5s:] %s%s\n" % [log.severity, ' ' * 2 * log.indent_depth, log.msg])
end
file.close
end