Fix timestamps of unparsable lines to fix line density display

This commit is contained in:
René Stadler 2007-11-15 18:17:28 +02:00 committed by Stefan Sauer
parent 00786f0121
commit 0482a50c3b

View File

@ -239,7 +239,6 @@ class LazyLogModel (LogModelBase):
non_regex_line = line[:non_regex_len] non_regex_line = line[:non_regex_len]
regex_line = line[non_regex_len:] regex_line = line[non_regex_len:]
try:
prefix = non_regex_line.rstrip () prefix = non_regex_line.rstrip ()
while " " in prefix: while " " in prefix:
prefix = prefix.replace (" ", " ") prefix = prefix.replace (" ", " ")
@ -247,14 +246,16 @@ class LazyLogModel (LogModelBase):
ts = Data.parse_time (ts_s) ts = Data.parse_time (ts_s)
pid = int (pid_s) pid = int (pid_s)
thread = int (thread_s, 16) thread = int (thread_s, 16)
try:
level = Data.DebugLevel (level_s) level = Data.DebugLevel (level_s)
match = self.__line_regex.match (regex_line[:-len (os.linesep)]) match = self.__line_regex.match (regex_line[:-len (os.linesep)])
except ValueError: except ValueError:
level = Data.DebugLevelNone
match = None match = None
if match is None: if match is None:
# FIXME? # FIXME?
groups = [0, 0, 0, Data.DebugLevelNone, "", "", 0, "", "", non_regex_len] groups = [ts, pid, thread, level, "", "", 0, "", "", non_regex_len]
else: else:
groups = [ts, pid, thread, level] + list (match.groups ()) + [non_regex_len + match.end ()] groups = [ts, pid, thread, level] + list (match.groups ()) + [non_regex_len + match.end ()]