Optionally take a logger to log matches