Use customized logger from gatekeeper to remove duplicate code.