Cleanup (remove) code in getlog.

For issue #4165.