diff options
| author | Ralph Bean <rbean@redhat.com> | 2014-12-19 16:39:56 +0000 |
|---|---|---|
| committer | Ralph Bean <rbean@redhat.com> | 2014-12-19 16:39:56 +0000 |
| commit | 56ba00aa501f9cc67f1a7dabab53c5541dbd94ee (patch) | |
| tree | 301665c0c596d9f7d4eca2af9d44b64dcce2f591 /scripts/logview | |
| parent | f7f9545d9a622bcded52c09dbd26079799efe9ab (diff) | |
| download | ansible-56ba00aa501f9cc67f1a7dabab53c5541dbd94ee.tar.gz ansible-56ba00aa501f9cc67f1a7dabab53c5541dbd94ee.tar.xz ansible-56ba00aa501f9cc67f1a7dabab53c5541dbd94ee.zip | |
Log errors, but try to not crash with logview encounters the unexpected.
Diffstat (limited to 'scripts/logview')
| -rwxr-xr-x | scripts/logview | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/scripts/logview b/scripts/logview index 251eb22a0..334f07496 100755 --- a/scripts/logview +++ b/scripts/logview @@ -52,6 +52,9 @@ def search_logs(opts, logfiles): timestamp = os.path.basename(os.path.dirname(fn)) for line in open(fn): things = line.split('\t') + if len(things) < 5: + msg += "(logview error - unhandled line): %r\n" % line + continue if things[2] in opts.search_terms or 'ANY' in opts.search_terms: slurp = json.loads(things[4]) if opts.profile: |
