logger.error instead of logging.error (#1726)