Use runpy instead of import to get logger module.