Log errors, but try to not crash with logview encounters the unexpected.
This commit is contained in:
parent
f7f9545d9a
commit
56ba00aa50
1 changed files with 3 additions and 0 deletions
|
@ -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:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue