Commit d12f33b9 authored by Mathieu Giraud's avatar Mathieu Giraud Committed by Vidjil Team
Browse files

controllers/default/logger: receive and store log message from browser

parent 2b0a6fd5
......@@ -11,6 +11,7 @@
import defs
import vidjil_utils
import logging
import gluon.contrib.simplejson, time, datetime
if request.env.http_origin:
......@@ -29,6 +30,18 @@ def help():
return dict(message=T('help i\'m lost'))
def logger():
'''Log to the server'''
res = {"success" : "false",
"message" : "/client/: %s" % request.vars['msg']}
lvl = int(request.vars['lvl'])
lvl = logging.INFO
log.log(lvl, res)
def init_db():
if db( > 0).count() == 0:
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment