--- a/bin/pvl.verkko-syslog Fri Jan 04 21:15:25 2013 +0200
+++ b/bin/pvl.verkko-syslog Fri Jan 04 21:15:42 2013 +0200
@@ -68,18 +68,28 @@
log.info("Process syslog messages...")
for item in syslog :
- match = rules.apply(item)
+ item = rules.apply(item)
- if not match :
+ if not item :
continue
- log.info("%s", match)
+ log.info("%s", item)
+
+ rule = item.get('rule')
+
+ if rule :
+ out = item.get(str(rule))
+ else :
+ out = None
+
+ if not out :
+ continue
# TODO: map tag -> target?
if target :
- target(match)
+ target(out)
else :
- print match
+ print rule, out
# done
log.info("Exiting...")