def parse_syslog_line(line):
    'Parses lines created by hostapd and dnsmasq DHCP'
    tokens = line.split(' ')
    _skip_date_tokens(tokens)
    process = _find_process(tokens)
    if ((not process) or (not tokens)):
        _LOGGER.debug('Unable to process line: %r', line)
        return
    if (process == 'hostapd'):
        if (len(tokens) == 3):
            if (tokens[1] == 'AP-STA-CONNECTED'):
                return Event(tokens[2], 'home', True, tokens[1])
            elif (tokens[1] == 'AP-STA-DISCONNECTED'):
                return Event(tokens[2], 'timeout', True, tokens[1])
        elif ((len(tokens) > 4) and (tokens[1] == 'STA')):
            suffix = ' '.join(_remove_param(tokens[3:]))
            for (consider, status) in STA_EVENTS.items():
                if suffix.endswith(consider):
                    if (status == ''):
                        return
                    return Event(tokens[2], status, True, suffix)
            _LOGGER.warning('Unhandled line: %r', line)
    elif (process == 'dnsmasq-dhcp'):
        if (len(tokens) >= 3):
            if tokens[0].startswith('DHCPACK('):
                return Event(tokens[2], 'home', False, tokens[0])
Parses lines created by hostapd and dnsmasq DHCP
def parse_syslog_line(line):
    
    tokens = line.split(' ')
    _skip_date_tokens(tokens)
    process = _find_process(tokens)
    if ((not process) or (not tokens)):
        _LOGGER.debug('Unable to process line: %r', line)
        return
    if (process == 'hostapd'):
        if (len(tokens) == 3):
            if (tokens[1] == 'AP-STA-CONNECTED'):
                return Event(tokens[2], 'home', True, tokens[1])
            elif (tokens[1] == 'AP-STA-DISCONNECTED'):
                return Event(tokens[2], 'timeout', True, tokens[1])
        elif ((len(tokens) > 4) and (tokens[1] == 'STA')):
            suffix = ' '.join(_remove_param(tokens[3:]))
            for (consider, status) in STA_EVENTS.items():
                if suffix.endswith(consider):
                    if (status == ):
                        return
                    return Event(tokens[2], status, True, suffix)
            _LOGGER.warning('Unhandled line: %r', line)
    elif (process == 'dnsmasq-dhcp'):
        if (len(tokens) >= 3):
            if tokens[0].startswith('DHCPACK('):
                return Event(tokens[2], 'home', False, tokens[0])