Make a separate class for handling logging uniformly.
Convert main lib to make use of new logger.