log messages now recorded using writeToLog, startLogging now has a serverMode parameter. If this is set True, then everything sent to stdout is now redirected to the logfile with a severity of warning.
unit tests pass.
added a couple unit tests.