Daniel P. Berrange fc59d0ae9c Fix flaw in detecting log format
The log message regex has been

[0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}:[0-9]{2}\.[0-9]{3}\+[0-9]{4}: [0-9]+: debug|info|warning|error :

The precedence of '|' is high though, so this is equivalent to matching

   [0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}:[0-9]{2}\.[0-9]{3}\+[0-9]{4}: [0-9]+: debug

Or

   info

Or

   warning

Or

   error :

Which is clearly not what it should have done. This caused the code to
skip over things which are not log messages. The solution is to simply
add brackets.

A test case is also added to validate correctness.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
(cherry picked from commit 5787f0b95ed5a58be020836bda4b27fa3538086c)
2013-10-29 16:10:22 +00:00
..
2013-10-29 16:10:22 +00:00
2013-07-29 13:09:39 -06:00
2013-03-19 13:13:28 -06:00
2013-09-25 18:12:09 +01:00
2013-02-12 09:00:15 -07:00
2013-10-29 16:10:22 +00:00