Skip to content

Commit

Permalink
reducing logging output (#535)
Browse files Browse the repository at this point in the history
  • Loading branch information
PatMyron authored Aug 11, 2020
1 parent f9fcc6d commit 9fcf77b
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/rpdk/core/contract/resource_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -348,8 +348,14 @@ def _make_payload(self, action, request, callback_context=None):
}

def _call(self, payload):
payload_to_log = {
key: payload[key] for key in ["callbackContext", "action", "request"]
}
LOG.debug(
"Sending request\n%s",
json.dumps(payload_to_log, ensure_ascii=False, indent=2),
)
payload = json.dumps(payload, ensure_ascii=False, indent=2)
LOG.debug("Sending request\n%s", payload)
result = self._client.invoke(
FunctionName=self._function_name, Payload=payload.encode("utf-8")
)
Expand Down

0 comments on commit 9fcf77b

Please sign in to comment.