Turn regex debugging print statement into logger.debug() call