[Libreoffice-commits] core.git: bin/find-most-common-warn-messages.py
Noel Grandin
noel at peralex.com
Thu Jun 9 11:39:03 UTC 2016
bin/find-most-common-warn-messages.py | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
New commits:
commit 45913cd580ae5b01aade79936f2c4720d29e5b7a
Author: Noel Grandin <noel at peralex.com>
Date: Thu Jun 9 13:38:00 2016 +0200
pretty up the output and add a sample string
Change-Id: I1c37b32e2127ba99b48b5ce3176e605f4e797475
diff --git a/bin/find-most-common-warn-messages.py b/bin/find-most-common-warn-messages.py
index 3cbf211..d89a887 100755
--- a/bin/find-most-common-warn-messages.py
+++ b/bin/find-most-common-warn-messages.py
@@ -14,6 +14,7 @@ process = subprocess.Popen("find workdir -name '*.log' | xargs grep -h 'warn:' |
shell=True, stdout=subprocess.PIPE, universal_newlines=True)
messages = dict() # dict of sourceAndLine->count
+sampleOfMessage = dict() # dict of sourceAndLine->string
for line in process.stdout:
line = line.strip()
# a sample line is:
@@ -24,12 +25,13 @@ for line in process.stdout:
messages[sourceAndLine] = messages[sourceAndLine] + 1
else:
messages[sourceAndLine] = 1
+ sampleOfMessage[sourceAndLine] = tokens[6]
tmplist = list() # set of tuple (count, sourceAndLine)
for key, value in messages.iteritems():
tmplist.append([value,key])
for i in sorted(tmplist, key=lambda v: v[0]):
- print i
+ print( "%6d %s %s" % (i[0], i[1], sampleOfMessage[i[1]]) )
More information about the Libreoffice-commits
mailing list