sb: Generate an error report on an error.

Generate an error report users can send to the mailing list with
error details.
This commit is contained in:
Chris Johns
2014-05-08 02:58:14 +00:00
parent 2a6acc7267
commit 74da24cb61
7 changed files with 120 additions and 22 deletions

View File

@@ -86,9 +86,16 @@ def flush(log = None):
elif default is not None:
default.flush()
def tail(log = None):
if log is not None:
return log.tail
if default is not None:
return default.tail
return 'No log output'
class log:
"""Log output to stdout or a file."""
def __init__(self, streams = None, tail_size = 100):
def __init__(self, streams = None, tail_size = 200):
self.tail = []
self.tail_size = tail_size
self.fhs = [None, None]