Added log when a resource (and context) are sorted from the tree.

Should fix #11181
Added log when a resource (and context) are sorted from the tree.

* origin/pr/11319:
  Added log when a resource (and context) are sorted from the tree.