Use proper logging
parent
74f811d865
commit
cb093d8063
|
@ -8,7 +8,7 @@ module LootDataProxy
|
|||
end
|
||||
data_service.report_loot(opts)
|
||||
rescue Exception => e
|
||||
puts "Call to #{data_service.class}#report_loot threw exception: #{e.message}"
|
||||
elog "Call to #{data_service.class}#report_loot threw exception: #{e.message}"
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -24,8 +24,8 @@ module LootDataProxy
|
|||
opts[:wspace] = wspace
|
||||
data_service.loot(opts)
|
||||
rescue Exception => e
|
||||
puts "Call to #{data_service.class}#loots threw exception: #{e.message}"
|
||||
e.backtrace.each { |line| puts "#{line}\n" }
|
||||
elog "Call to #{data_service.class}#loots threw exception: #{e.message}"
|
||||
e.backtrace.each { |line| elog "#{line}\n" }
|
||||
end
|
||||
end
|
||||
alias_method :loot, :loots
|
||||
|
@ -35,8 +35,8 @@ module LootDataProxy
|
|||
data_service = self.get_data_service
|
||||
data_service.update_loot(opts)
|
||||
rescue Exception => e
|
||||
puts "Call to #{data_service.class}#update_loot threw exception: #{e.message}"
|
||||
e.backtrace.each { |line| puts "#{line}\n" }
|
||||
elog "Call to #{data_service.class}#update_loot threw exception: #{e.message}"
|
||||
e.backtrace.each { |line| elog "#{line}\n" }
|
||||
end
|
||||
end
|
||||
end
|
|
@ -17,7 +17,7 @@ module ResponseDataHelper
|
|||
return JSON.parse(body, object_class: OpenStruct)
|
||||
end
|
||||
rescue Exception => e
|
||||
puts "open struct conversion failed #{e.message}"
|
||||
elog "open struct conversion failed #{e.message}"
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -44,8 +44,8 @@ module ResponseDataHelper
|
|||
return rv
|
||||
end
|
||||
rescue Exception => e
|
||||
puts "Mdm Object conversion failed #{e.message}"
|
||||
e.backtrace.each { |line| puts "#{line}\n" }
|
||||
elog "Mdm Object conversion failed #{e.message}"
|
||||
e.backtrace.each { |line| elog "#{line}\n" }
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -67,8 +67,8 @@ module ResponseDataHelper
|
|||
File.open(save_path, 'w+') { |file| file.write(decoded_file) }
|
||||
end
|
||||
rescue Exception => e
|
||||
puts "There was an error writing the file: #{e}"
|
||||
e.backtrace.each { |line| puts "#{line}\n"}
|
||||
elog "There was an error writing the file: #{e}"
|
||||
e.backtrace.each { |line| elog "#{line}\n"}
|
||||
end
|
||||
save_path
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue