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>
diff --git a/src/vpp-api/python/vpp_papi/vpp_papi.py b/src/vpp-api/python/vpp_papi/vpp_papi.py
index 63fcc70..6ba7d64 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 @@
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):