diff options
Diffstat (limited to 'stdout_printer.py')
-rw-r--r-- | stdout_printer.py | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/stdout_printer.py b/stdout_printer.py index 98e91fa..1bc0d64 100644 --- a/stdout_printer.py +++ b/stdout_printer.py | |||
@@ -8,10 +8,12 @@ | |||
8 | # Public functions | 8 | # Public functions |
9 | ############################################################################### | 9 | ############################################################################### |
10 | 10 | ||
11 | def print_stream(stream): | 11 | def stdout_printer(stream): |
12 | for record in stream: | 12 | for record in stream: |
13 | if record.record_type == "event": | 13 | if record.record_type == "event": |
14 | _print_event(record) | 14 | _print_event(record) |
15 | elif record.record_type == "error": | ||
16 | _print_error(record) | ||
15 | print("") | 17 | print("") |
16 | 18 | ||
17 | ############################################################################### | 19 | ############################################################################### |
@@ -22,3 +24,8 @@ def _print_event(record): | |||
22 | print("Job: {}.{}".format(record.pid,record.job)) | 24 | print("Job: {}.{}".format(record.pid,record.job)) |
23 | print("Type: {}".format(record.type_name)) | 25 | print("Type: {}".format(record.type_name)) |
24 | print("Time: {}".format(record.when)) | 26 | print("Time: {}".format(record.when)) |
27 | |||
28 | def _print_error(record): | ||
29 | print("Job: {}.{}".format(record.pid,record.job)) | ||
30 | print("Time: {}".format(record.when)) | ||
31 | print("Type: {}".format("ERROR")) | ||