implement logger.