code: def log_to_api(self):
          
          if self.entries:
              try:
                  headers = {'Content-Type': 'application/json'}
                  self.session.post('/v2/logs/app', headers=headers, json=self.entries)
                  # self.entries = []  # clear entries
              except Exception:
                  # best effort on api logging
                  pass
docs: Best effort API logger.
  
          Send logs to the ThreatConnect API and do nothing if the attempt fails.