Skip to content

Commit

Permalink
chore: update logging
Browse files Browse the repository at this point in the history
  • Loading branch information
bethesque committed Oct 1, 2020
1 parent 78afe8f commit d39533c
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -77,17 +77,21 @@ def parsed_query_params
def query
@query ||= begin
if request.get?
Rack::Utils.parse_nested_query(request.uri.query)
nested_query
elsif request.post?
params(symbolize_names: false, default: {})
end
end
end

def log_request
parameters = request.get? ? request.query : params
parameters = request.get? ? nested_query : params
logger.info "Fetching pacts for verification by #{provider_name}", provider_name: provider_name, params: parameters
end

def nested_query
@nested_query ||= Rack::Utils.parse_nested_query(request.uri.query)
end
end
end
end
Expand Down

0 comments on commit d39533c

Please sign in to comment.