Logging to a file or monitor

I added a function that will log to file, log to monitor, or log to
both, as well as two bools to determine what it logs to.