Refactor logging.
Normalize func name.