Renders the iterator of log events into text.
(log_events, colors)
| 177 | |
| 178 | |
| 179 | def 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 | |
| 189 | def print_logs_html(log_events): |