Skip to content

Commit 389235e

Browse files
author
mganisin
authored
Merge pull request 3scale-qe#111 from mganisin/truncate-curl
truncate curl logging to avoid large log dumps
2 parents 23922e8 + 263a0d5 commit 389235e

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

threescale_api/utils.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,8 @@ def request2curl(request: requests.PreparedRequest) -> str:
166166
body = request.body
167167
if isinstance(body, bytes):
168168
body = body.decode("utf-8")
169+
if len(body) > 160:
170+
body = body[:160] + "..."
169171
cmd.append("-d %s" % shlex.quote(body))
170172
cmd.append(shlex.quote(request.url))
171173

0 commit comments

Comments
 (0)