def delete_syslog(module, array):
    """Delete Syslog Server"""
    changed = False
    noport_address = module.params['protocol'] + '://' + module.params[
        'address']
    if module.params['port']:
        full_address = noport_address + ':' + module.params['port']
    else:
        full_address = noport_address
    address_list = array.get(syslogserver=True)['syslogserver']
    if address_list:
        for address in range(0, len(address_list)):
            if address_list[address] == full_address:
                del address_list[address]
                try:
                    array.set(syslogserver=address_list)
                    changed = True
                    break
                except Exception:
                    module.fail_json(msg=
                        'Failed to remove syslog server: {0}'.format(
                        full_address))
    module.exit_json(changed=changed)
