MCPcopy Create free account
hub / github.com/ElementsProject/elements / print_logs_plain

Function print_logs_plain

test/functional/combine_logs.py:179–186  ·  view source on GitHub ↗

Renders the iterator of log events into text.

(log_events, colors)

Source from the content-addressed store, hash-verified

177
178
179def print_logs_plain(log_events, colors):
180 """Renders the iterator of log events into text."""
181 for event in log_events:
182 lines = event.event.splitlines()
183 print("{0} {1: <5} {2} {3}".format(colors[event.source.rstrip()], event.source, lines[0], colors["reset"]))
184 if len(lines) > 1:
185 for line in lines[1:]:
186 print("{0}{1}{2}".format(colors[event.source.rstrip()], line, colors["reset"]))
187
188
189def print_logs_html(log_events):

Callers 1

mainFunction · 0.85

Calls 1

formatMethod · 0.80

Tested by

no test coverage detected