You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
12 lines
509 B
12 lines
509 B
|
7 days ago
|
# -*- coding: utf-8 -*-
|
||
|
|
"""票 04:testopp 日志关键行提取。"""
|
||
|
|
import io, sys, re
|
||
|
|
sys.stdout = io.TextIOWrapper(sys.stdout.buffer, encoding='utf-8')
|
||
|
|
txt = open(r'e:/code/crm-backend-matt/.scratch/opportunity-bugfix/t04-testopp.log',
|
||
|
|
encoding='utf-8', errors='replace').read()
|
||
|
|
for line in txt.splitlines():
|
||
|
|
if re.search(r'(STEP|EXIT=|BUILD |Tests run: \d+, Fail|Reactor Summary|crm-\w+ \.+|FAILURE|ERROR\])', line):
|
||
|
|
print(line)
|
||
|
|
print('--- tail 400 chars ---')
|
||
|
|
print(txt[-400:])
|