From 78d458489de8843b5fc9d87abe30e4315f7f235e Mon Sep 17 00:00:00 2001 From: Evandro Jr Date: Thu, 2 Jul 2015 15:15:21 +0000 Subject: [PATCH] Palitive for the broken API log --- lib/noosfero/api/api.rb | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/lib/noosfero/api/api.rb b/lib/noosfero/api/api.rb index e680d65..ce59346 100644 --- a/lib/noosfero/api/api.rb +++ b/lib/noosfero/api/api.rb @@ -12,6 +12,13 @@ module Noosfero use GrapeLogging::Middleware::RequestLogger, { logger: logger } rescue_from :all do |e| + # Many brave warriors have fallen in the battle of fixing the API log + # Please, don't remove these 2 lines until the API log problem has + # been PROPERLY fixed by our savior!!! + # Otherwise we will have no clue of what went wrong in the API + puts "API error during processing: #{$!}" + puts "Backtrace:\n\t#{e.backtrace.join("\n\t")}" + # Thanks! logger.error e end @@ -61,4 +68,4 @@ module Noosfero end end end -end +end \ No newline at end of file -- libgit2 0.21.2