Refactor logging with a new method that checks the appropriate flags and then logs the requested level of information. Must also update the Broker initialization in broker.go to accept debugging flags to turn on/off log messages/file logging.