diff options
author | David Sommerseth <davids@redhat.com> | 2015-11-12 15:14:12 +0100 |
---|---|---|
committer | David Sommerseth <davids@redhat.com> | 2015-11-12 15:16:19 +0100 |
commit | 601ef99ca66f694c1c7e27c97be0554572f5b6ad (patch) | |
tree | 8ce98bf8a196d095df15cab30e84eb6e8bb0227d /LogActio/Reporters/QpidReporter.py | |
parent | eea95bcc2850a1370b50e2db7506bb3f9aaec557 (diff) | |
download | logactio-601ef99ca66f694c1c7e27c97be0554572f5b6ad.tar.gz logactio-601ef99ca66f694c1c7e27c97be0554572f5b6ad.tar.xz logactio-601ef99ca66f694c1c7e27c97be0554572f5b6ad.zip |
Improve the message passing to the Reporter modules
The message sent to the Reporter modules contained a string of
each regex match group values separated by a pipe (|). This was
not flexible enough, so this change will send all the regex match
groups as a Python list to the Reporter.
The existing Reporter modules have currently just been modified
to stitch together the message list as a string identical to the
old behaviour now, to ensure backwards compatibility for now.
Signed-off-by: David Sommerseth <davids@redhat.com>
Diffstat (limited to 'LogActio/Reporters/QpidReporter.py')
-rw-r--r-- | LogActio/Reporters/QpidReporter.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/LogActio/Reporters/QpidReporter.py b/LogActio/Reporters/QpidReporter.py index 3295616..6c05df5 100644 --- a/LogActio/Reporters/QpidReporter.py +++ b/LogActio/Reporters/QpidReporter.py @@ -114,7 +114,7 @@ class QpidReporter(LogActio.ReporterQueue.ReporterQueue): def ProcessEvent(self, logfile, prefix, msg, count, threshold): # Format the report message msg = {"prefix": prefix, "count": count, "threshold": threshold, - "message": msg, "logfile": logfile} + "message": "|".join(msg), "logfile": logfile} # Queue the message for sending self._QueueMsg(0, json.dumps(msg)) |