Esempio n. 1
0
def save_log(diction):
    if "event" not in diction:
        logging.error("No event type in log")
        return
    key = gen_random(20)
    newlog = Logs(key_name=key, event=diction['event'])
    props = newlog.properties()
    for ii in diction:
        if ii in props:
            setattr(newlog, ii, diction[ii])
    newlog.put()
Esempio n. 2
0
def save_log(diction):
  if "event" not in diction:
    logging.error("No event type in log")
    return
  key = gen_random(20)
  newlog = Logs(key_name=key, event=diction['event'])
  props = newlog.properties()
  for ii in diction:
    if ii in props:
       setattr(newlog, ii, diction[ii])
  newlog.put()
Esempio n. 3
0
 def get(self):
     q = Logs.all()
     q.filter("account = ", "*****@*****.**")
     ents = q.fetch(10)
     count = 0
     for ii in ents:
         count += 1
         self.response.out.write(ii.details)
         self.response.out.write("<br/>")
     self.response.out.write("Number fetched " + str(count))
Esempio n. 4
0
 def get(self):
     q = Logs.all()
     q.filter("account = ", "*****@*****.**")
     ents = q.fetch(10)
     count = 0
     for ii in ents:
         count += 1
         self.response.out.write(ii.details)
         self.response.out.write("<br/>")
     self.response.out.write("Number fetched " + str(count))