Added commands to switch on and off logging.
TODO: Refactor this to be two separate commands from the logger.
Refactor this to be two separate commands from the logger.