Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
vidjil
vidjil
Commits
d2188b5e
Commit
d2188b5e
authored
Dec 06, 2017
by
Mathieu Giraud
Browse files
models/db.py, controllers/log.py: some comments
parent
94929684
Pipeline
#12067
passed with stages
in 18 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
server/web2py/applications/vidjil/controllers/log.py
View file @
d2188b5e
'''
Returns messages previouly logged within the 'user_log' table.
See UserLogHandler() in models/db.py.
'''
import
gluon.contrib.simplejson
if
request
.
env
.
http_origin
:
...
...
server/web2py/applications/vidjil/models/db.py
View file @
d2188b5e
...
...
@@ -323,6 +323,10 @@ class UserLogHandler(logging.Handler):
self
.
table
=
'user_log'
def
emit
(
self
,
record
):
'''
When 'user_id' and 'record_id' are defined,
further store the record in the db.
'''
if
hasattr
(
record
,
'user_id'
)
and
hasattr
(
record
,
'record_id'
):
from
datetime
import
datetime
now
=
datetime
.
now
()
...
...
Mathieu Giraud
@magiraud
mentioned in issue
#2936
·
Dec 06, 2017
mentioned in issue
#2936
mentioned in issue #2936
Toggle commit list
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment