Commit 05f229dc881a940179163fdb15dffde884360758

Authored by Victor Costa
2 parents fc901fc8 3ebc0a24

Merge branch 'api' into stable

Showing 1 changed file with 18 additions and 0 deletions   Show diff stats
lib/noosfero/api/request_logger.rb 0 → 100644
... ... @@ -0,0 +1,18 @@
  1 +module Noosfero
  2 + module API
  3 + class RequestLogger < GrapeLogging::Middleware::RequestLogger
  4 +
  5 + protected
  6 +
  7 + def parameters(response, duration)
  8 + {
  9 + path: request.path,
  10 + params: request.params.except('password'),
  11 + method: request.request_method,
  12 + total: (duration * 1000).round(2),
  13 + db: request.env[:db_duration].round(2),
  14 + }
  15 + end
  16 + end
  17 + end
  18 +end
... ...