code: def Log(self, frame):
      
      # Return error if log methods were not configured globally.
      if not self._log_message:
        return {'isError': True,
                'description': {'format': LOG_ACTION_NOT_SUPPORTED}}
  
      if self._quota_recovery_start_time:
        ms_elapsed = (time.time() - self._quota_recovery_start_time) * 1000
        if ms_elapsed > self.quota_recovery_ms:
          # We are out of the recovery period, clear the time and continue
          self._quota_recovery_start_time = None
        else:
          # We are in the recovery period, exit
          return
  
      # Evaluate watched expressions.
      message = 'LOGPOINT: ' + _FormatMessage(
          self._definition.get('logMessageFormat', ''),
          self._EvaluateExpressions(frame))
  
      line = self._definition['location']['line']
      cdbg_logging_location = (NormalizePath(frame.f_code.co_filename), line,
                               _GetFrameCodeObjectName(frame))
  
      if native.ApplyDynamicLogsQuota(len(message)):
        self._log_message(message)
      else:
        self._quota_recovery_start_time = time.time()
        self._log_message(DYNAMIC_LOG_OUT_OF_QUOTA)
      del cdbg_logging_location
      return None
docs: Captures the minimal application states, formats it and logs the message.
  
      Args:
        frame: Python stack frame of breakpoint hit.
  
      Returns:
        None on success or status message on error.