Implemented an initial version of the logger.
More to be done still.