Constrain log length for CBC proxy payload

This avoids any issues due to large payloads (e.g. with a lot of
polygons in the 'areas' field). While we may miss part of the log
in such cases, this is more than we get already anyway.
This commit is contained in:
Ben Thorner
2021-07-20 16:06:48 +01:00
parent d1791c6bfe
commit d24b45bb67

View File

@@ -123,7 +123,7 @@ class CBCProxyClientBase(ABC):
payload_bytes = bytes(json.dumps(payload), encoding='utf8')
try:
current_app.logger.info(
f"Calling lambda {lambda_name} with payload {payload}"
f"Calling lambda {lambda_name} with payload {str(payload)[:1000]}"
)
result = self._lambda_client.invoke(