Fixed #21771 -- Made log_deletion consistent with other log methods

Test suite passes (with sqlite) after making the change.

I have made the doc string more explicit that the log_deletion method **must** be called before the deletion.