(fil, matchers)
| 107 | |
| 108 | |
| 109 | def _detect_log_lines(fil, matchers): |
| 110 | global FILE_LOG_COUNT |
| 111 | FILE_LOG_COUNT[fil] = dict(_get_log_count_dict()) |
| 112 | # print('Working on file: %s' % fil) |
| 113 | with open(fil) as f: |
| 114 | lines = f.readlines() |
| 115 | FILE_LINE_COUNT[fil] = len(lines) |
| 116 | |
| 117 | ln = 0 |
| 118 | for line in lines: |
| 119 | line = line.strip() |
| 120 | ln += 1 |
| 121 | matched, level, line = _match(line, matchers) |
| 122 | if matched: |
| 123 | # print('File: %s, Level: %s, Line: %d:%s' % (fil, level, ln, line.strip())) |
| 124 | FILE_LOG_COUNT[fil][level] += 1 |
| 125 | |
| 126 | |
| 127 | def _post_process(file_dir): |
no test coverage detected