Use appropriate func to record logs according to different scene Upstream-commit: 444c967aece4ef021aefe209a067c5d94ceb817e Component: engine