summaryrefslogtreecommitdiffstats
path: root/src/vpp-api/python/vpp_papi/vpp_papi.py
diff options
context:
space:
mode:
authorKlement Sekera <ksekera@cisco.com>2019-09-12 09:01:06 +0000
committerOle Trøan <otroan@employees.org>2019-09-25 08:18:20 +0000
commit5e2f84d2cf97a6efa89c1c4bbf80de6a8f03d2a8 (patch)
tree31020816084f62514568cfbfe7d60f2538cf3207 /src/vpp-api/python/vpp_papi/vpp_papi.py
parent7ca5aaac10e95306f74ea4afd52110dd46aa0381 (diff)
papi: truncate long logger messages
Dumping whole cli_inband output causes huge unformatted messages written to logger, so truncate these to avoid that. Type: fix Change-Id: I59565a98e3595cbfe4971cc346e104cb198d8f24 Signed-off-by: Klement Sekera <ksekera@cisco.com>
Diffstat (limited to 'src/vpp-api/python/vpp_papi/vpp_papi.py')
-rw-r--r--src/vpp-api/python/vpp_papi/vpp_papi.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/vpp-api/python/vpp_papi/vpp_papi.py b/src/vpp-api/python/vpp_papi/vpp_papi.py
index 63fcc70e395..6ba7d648bdb 100644
--- a/src/vpp-api/python/vpp_papi/vpp_papi.py
+++ b/src/vpp-api/python/vpp_papi/vpp_papi.py
@@ -665,7 +665,10 @@ class VPPApiClient(object):
self.transport.resume()
- self.logger.debug('Return from {!r}'.format(r))
+ s = 'Return value: {!r}'.format(r)
+ if len(s) > 80:
+ s = s[:80] + "..."
+ self.logger.debug(s)
return rl
def _call_vpp_async(self, i, msg, **kwargs):