Fix message display

This commit is contained in:
René Stadler 2007-11-15 18:12:57 +02:00 committed by Stefan Sauer
parent 109cc29ed9
commit 00786f0121
2 changed files with 4 additions and 4 deletions

View file

@ -124,7 +124,7 @@ def default_log_line_regex_ ():
OBJECT = "(?:<([^>]+)>)?" OBJECT = "(?:<([^>]+)>)?"
MESSAGE = " (.+)" MESSAGE = " (.+)"
expressions = [CATEGORY, FILENAME, LINE, FUNCTION, OBJECT] expressions = [" *", CATEGORY, FILENAME, LINE, FUNCTION, OBJECT]
# New log format: # New log format:
## expressions = [TIME, PID, THREAD, LEVEL, CATEGORY, FILENAME, LINE, FUNCTION, ## expressions = [TIME, PID, THREAD, LEVEL, CATEGORY, FILENAME, LINE, FUNCTION,
## OBJECT, MESSAGE] ## OBJECT, MESSAGE]

View file

@ -248,15 +248,15 @@ class LazyLogModel (LogModelBase):
pid = int (pid_s) pid = int (pid_s)
thread = int (thread_s, 16) thread = int (thread_s, 16)
level = Data.DebugLevel (level_s) level = Data.DebugLevel (level_s)
match = self.__line_regex.match (regex_line[:-len (os.linesep)].lstrip ()) match = self.__line_regex.match (regex_line[:-len (os.linesep)])
except ValueError: except ValueError:
match = None match = None
if match is None: if match is None:
# FIXME? # FIXME?
groups = [0, 0, 0, Data.DebugLevelNone, "", "", 0, "", "", ts_len] groups = [0, 0, 0, Data.DebugLevelNone, "", "", 0, "", "", non_regex_len]
else: else:
groups = [ts, pid, thread, level] + list (match.groups ()) + [match.end ()] groups = [ts, pid, thread, level] + list (match.groups ()) + [non_regex_len + match.end ()]
for col_id in (self.COL_CATEGORY, self.COL_FILENAME, self.COL_FUNCTION, for col_id in (self.COL_CATEGORY, self.COL_FILENAME, self.COL_FUNCTION,
self.COL_OBJECT,): self.COL_OBJECT,):