mirror of
https://github.com/RfidResearchGroup/ChameleonMini.git
synced 2026-05-12 11:20:37 -07:00
Add Color to Note
(cherry picked from commit 2ef5769)
This commit is contained in:
+5
-4
@@ -19,11 +19,12 @@ def verboseLog(text):
|
||||
|
||||
def formatText(log):
|
||||
formatString = '{timestamp:0>5d} ms <{deltaTimestamp:>+6d} ms>:'
|
||||
formatString += '{eventName:<28} ({dataLength:<3} bytes)\t[{data:<20}]\t{note}\n'
|
||||
text = ''
|
||||
|
||||
for logEntry in log:
|
||||
formatString += '{eventName:<28} ({dataLength:<3} bytes) [{data:<20}] ' \
|
||||
'\033[94m {note} \x1b[0m \n'
|
||||
|
||||
text = ''
|
||||
|
||||
for logEntry in log:
|
||||
text += formatString.format(**logEntry)
|
||||
|
||||
return text
|
||||
|
||||
Reference in New Issue
Block a user