issue #4689: support external key.
Replace log with CCLOG
Merge pull request #7326 from Dhilan007/v3-gc-refactor

issue #4689: support external key.