def _decode(self, data):
            m = self.re_syslog.match(data)
            if m:
                d = m.groupdict()
                prio = int(d.pop('prio'))
                try:
                    d['facility'] = self.facilities[prio >> 3]
                except __HOLE__:
                    d['facility'] = 'unknown'
                d['severity'] = self.severities[prio & 7]

                timestamp = d.pop('timestamp')
                d['timestamp'] = dateutil.parser.parse(timestamp)
                return d
            else:
                raise ValueError('invalid syslog')
dataset/ETHPy150Open artirix/logcabin/logcabin/filters/syslog.py/Syslog._decode