Convenience function to start logging to or reading from the given trace_file, depending on the values of
enable_logging and
enable_online.
If enable_logging is true, a log handler
will be set up to redirect all client network activity into the given trace_file. If trace_file already exists,
it will be overwritten.
If enable_online is false, the given
trace_file is loaded using load_trace and then a mock server is
started using run.
On failure, throws will be set and the Server state will
remain unchanged. A GIOError will be set if logging is enabled (
enable_logging) and there is a problem writing to the trace file; or if a trace needs to be loaded and there is a problem reading
from the trace file.
| this |
a Server |
| trace_file |
a trace file to load |