core.errorlog module
Framework for logging errors.
-
class core.errorlog.CaptureStream(name, add_header=False, tee=True)[source]
Bases: object
Redirects output to a file-like object to an internal list as well as a
file.
-
flush()[source]
Flushes the output file.
-
hook()[source]
Replaces the named stream with the redirected stream.
-
unhook()[source]
Restores the original stream object.
-
write(string)[source]
Writes a string to the captured stream.
- Parameters:
string – The string to write.
-
core.errorlog.start()[source]
Starts redirection of stdout and stderr.
-
core.errorlog.stop()[source]
Stops redirection of stdout and stderr.