Commit 05f229dc881a940179163fdb15dffde884360758
Exists in
theme-brasil-digital-from-staging
and in
9 other branches
Merge branch 'api' into stable
Showing
1 changed file
with
18 additions
and
0 deletions
Show diff stats
... | ... | @@ -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 | ... | ... |