Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #9 from stackmob/master

Ignore extra junk at the beginning of lines

Great choice for a fix from drapp!
  • Loading branch information...
commit 2d63de63d8dcf27011ebd1287986e51fec8d9905 2 parents 4c5598d + ba795db
@esedor esedor authored
Showing with 4 additions and 4 deletions.
  1. +4 −4 dex/dex.py
View
8 dex/dex.py
@@ -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
Please sign in to comment.
Something went wrong with that request. Please try again.