Set up proper logging.