style(factory) clean up logging code