code: def accept_line(self, logevent):
          
          if ("is now in state" in logevent.line_str and
                  logevent.split_tokens[-1] in self.states):
              return True
  
          if ("replSet" in logevent.line_str and
                  logevent.thread == "rsMgr" and
                  logevent.split_tokens[-1] in self.states):
              return True
  
          return False
docs: Return True on match.
  
          Only match log lines containing 'is now in state' (reflects other
          node's state changes) or of type "[rsMgr] replSet PRIMARY" (reflects
          own state changes).