コード例 #1
0
ファイル: logs.py プロジェクト: AkilDixon/UserInfuser
 def post(self):
   logsecret = self.request.get('key') 
   official_log_secret = passphrase_dao.get_log_secret()    
   if logsecret != official_log_secret:
     logging.error("Logging: Bad logging secret: %s vs %s"%(logsecret, official_log_secret))
     return
   eventtype = self.request.get('event')
   if eventtype not in constants.LOGGING.CLIENT_EVENT and \
      eventtype not in constants.LOGGING.API_EVENT:
     logging.error("Unknown event type: %s"%eventtype)
     return
   diction = {}
   for args in self.request.arguments():
     diction[args] = self.request.get(args)
   logs_dao.save_log(diction)
   return 
コード例 #2
0
ファイル: logs.py プロジェクト: zkenstein/userinfuser
 def post(self):
   logsecret = self.request.get('key') 
   official_log_secret = passphrase_dao.get_log_secret()    
   if logsecret != official_log_secret:
     logging.error("Logging: Bad logging secret: %s vs %s"%(logsecret, official_log_secret))
     return
   eventtype = self.request.get('event')
   if eventtype not in constants.LOGGING.CLIENT_EVENT and \
      eventtype not in constants.LOGGING.API_EVENT:
     logging.error("Unknown event type: %s"%eventtype)
     return
   diction = {}
   for args in self.request.arguments():
     diction[args] = self.request.get(args)
   logs_dao.save_log(diction)
   return 
コード例 #3
0
ファイル: logs.py プロジェクト: AkilDixon/UserInfuser
def create(diction):
  diction['key'] = passphrase_dao.get_log_secret()    
  assert ('event' in diction), "Logs must always have an event type"
  __url_async_post(constants.LOGGING.PATH, diction)
コード例 #4
0
def create(diction):
    diction['key'] = passphrase_dao.get_log_secret()
    assert ('event' in diction), "Logs must always have an event type"
    __url_async_post(constants.LOGGING.PATH, diction)