def METHOD_NAME(self):
    """Test to check error when logger_port and logger_host are not provided with "hostport"."""
    # Was test-26.3, via test_logger_type.py
    fname = "test_log_messages_to_hostport"
    self.config.logger_type = "hostport"
    self.config.logger_host = "localhost"
    self.config.logger_port = "42"
    self.logger = get_pbench_logger(fname, self.config)
    assert (
        self.config.logger_type == "hostport"
    ), f"Unexpected logger type encountered, '{self.config.logger_type}', expected 'hostport'"
    assert (
        self.config.log_dir is None
    ), f"Unexpected log directory configuration found, {self.config_log_dir}"
    assert _handlers[fname] == self.logger.logger.handlers[0]
    assert (
        _handlers[fname].__class__.__name__ == "SysLogHandler"
    ), f"Unexpected handler set, {_handlers[fname].__class__.__name__!r}"
    assert (
        _handlers[fname].address[0] == "localhost"
        and _handlers[fname].address[1] == 42
    ), f"Unexpected handler address set, {_handlers[fname].address!r}"