Adding logs for query operations.