Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Ignore extra junk at the beginning of lines #9

Merged
merged 1 commit into from Mar 5, 2013
Jump to file or symbol
Failed to load files and symbols.
+4 −4
Split
View
@@ -777,7 +777,7 @@ class StandardQueryHandler(QueryLineHandler):
########################################################################
def __init__(self):
self.name = 'Standard Query Log Line Handler'
- self._regex = '.{20}\[conn(?P<connection_id>\d+)\] '
+ self._regex = '.*\[conn(?P<connection_id>\d+)\] '
self._regex += '(?P<operation>\S+) (?P<ns>\S+\.\S+) query: '
self._regex += '(?P<query>\{.*\}) (?P<options>(\S+ )*)'
self._regex += '(?P<query_time>\d+)ms'
@@ -807,7 +807,7 @@ class CmdQueryHandler(QueryLineHandler):
########################################################################
def __init__(self):
self.name = 'CMD Log Line Handler'
- self._regex = '.{20}\[conn(?P<connection_id>\d+)\] '
+ self._regex = '.*\[conn(?P<connection_id>\d+)\] '
self._regex += 'command (?P<db>\S+)\.\$cmd command: '
self._regex += '(?P<query>\{.*\}) (?P<options>(\S+ )*)'
self._regex += '(?P<query_time>\d+)ms'
@@ -842,7 +842,7 @@ class UpdateQueryHandler(QueryLineHandler):
########################################################################
def __init__(self):
self.name = 'Update Log Line Handler'
- self._regex = '.{20}\[conn(?P<connection_id>\d+)\] '
+ self._regex = '.*\[conn(?P<connection_id>\d+)\] '
self._regex += 'update (?P<ns>\S+\.\S+) query: '
self._regex += '(?P<query>\{.*\}) update: (?P<update>\{.*\}) '
self._regex += '(?P<options>(\S+ )*)(?P<query_time>\d+)ms'
@@ -1027,4 +1027,4 @@ def construct_mapping(self, node, deep=False):
node.start_mark, 'found unacceptable key (%s)' % exc, key_node.start_mark)
value = self.construct_object(value_node, deep=deep)
mapping[key] = value
- return mapping
+ return mapping