0
0
Fork 0
mirror of https://github.com/alerta/alerta.git synced 2025-02-05 14:09:44 +00:00
alerta_alerta/etc/alerta/parsers/AlertaParser.py
2013-03-22 16:52:57 +00:00

11 lines
379 B
Python

m = re.search('(?P<module>\S+) (?P<thread>\S+) (?P<level>DEBUG|INFO|AUDIT|WARNING|ERROR|CRITICAL|TRACE) - (?P<text>.*)', text)
if m:
resource = resource + ':' + m.group('module')
value = m.group('level')
text = m.group('text')
tags.append('thread:%s' % m.group('thread'))
else:
LOG.warning('No match: locals = %s', locals())
# clean-up temp variables
del m