Added logging on rule matching.