lib/rundock/plugin/hook/file.rb in rundock-0.4.14 vs lib/rundock/plugin/hook/file.rb in rundock-0.4.15
- old
+ new
@@ -34,10 +34,10 @@
class File < Base
def hook(operation_attributes, log_buffer)
file = ::File.open(@contents[:filepath], 'w')
file.puts("[hookname:#{@name} node:#{operation_attributes[0][:nodename]}]")
log_buffer.each do |log|
- file.puts("[\%5s:] %s%s\n" % [log.severity, ' ' * 2 * log.indent_depth, log.message])
+ file.puts(log.formatted_message)
end
file.close
end
end
end