qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From c...@apache.org
Subject [qpid-dispatch] branch master updated: DISPATCH-1692: Strip away '(truncated)' from long transfers
Date Thu, 25 Jun 2020 19:11:27 GMT
This is an automated email from the ASF dual-hosted git repository.

chug pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/qpid-dispatch.git


The following commit(s) were added to refs/heads/master by this push:
     new 2f0c33d  DISPATCH-1692: Strip away '(truncated)' from long transfers
2f0c33d is described below

commit 2f0c33d930d08e0146ae62b23d60d4a73e1d13f5
Author: Chuck Rolke <chug@apache.org>
AuthorDate: Thu Jun 25 15:07:25 2020 -0400

    DISPATCH-1692: Strip away '(truncated)' from long transfers
    
    Show only the useful data just before the common line ending.
---
 tools/scraper/parser.py | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/tools/scraper/parser.py b/tools/scraper/parser.py
index 16e3da5..edf110a 100755
--- a/tools/scraper/parser.py
+++ b/tools/scraper/parser.py
@@ -753,13 +753,17 @@ class ParsedLogLine(object):
             # Performative: transfer [channel,handle] (id)
             self.transfer_short_name = self.shorteners.short_data_names.translate(res.transfer_bare,
customer=self)
             showdat = "<a href=\"#%s_dump\">%s</a>" % (self.transfer_short_name,
self.transfer_short_name)
+            spl = common.strings_of_proton_log(res.transfer_bare)
+            to_strip = "\"... (truncated)"
+            if spl.endswith(to_strip):
+                spl = spl[:-len(to_strip)]
             res.web_show_str = "<strong>%s</strong>  %s (%s) %s %s %s %s %s %s
- %s bytes" % (
                 res.name, colorize_bg(res.channel_handle), res.delivery_id,
                 self.highlighted("settled", res.transfer_settled, common.color_of("presettled")),
                 self.highlighted("more", res.transfer_more, common.color_of("more")),
                 self.highlighted("resume", res.transfer_resume, common.color_of("aborted")),
                 self.highlighted("aborted", res.transfer_aborted, common.color_of("aborted")),
-                showdat, common.strings_of_proton_log(res.transfer_bare)[-SEQUENCE_TRANSFER_SIZE:],
+                showdat, spl[-SEQUENCE_TRANSFER_SIZE:],
                 res.transfer_size)
             res.sdorg_str = "%s %s (%s) %s (%s%s%s%s)\\n%s" % (
                 res.name, res.channel_handle, res.delivery_id, res.transfer_size,
@@ -767,7 +771,7 @@ class ParsedLogLine(object):
                 self.unhighlighted(" more", res.transfer_more),
                 self.unhighlighted(" resume", res.transfer_resume),
                 self.unhighlighted(" aborted", res.transfer_aborted),
-                common.strings_of_proton_log(res.transfer_bare)[-SEQUENCE_TRANSFER_SIZE:])
+                spl[-SEQUENCE_TRANSFER_SIZE:])
 
     def adverbl_link_to(self):
         """


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org


Mime
View raw message