Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
vidjil
vidjil
Commits
5596d8fd
Commit
5596d8fd
authored
Apr 11, 2015
by
Mathieu Giraud
Committed by
Vidjil Team
Apr 12, 2015
Browse files
models/db.py: add ADMIN debug level
parent
deb3fc4c
Changes
1
Hide whitespace changes
Inline
Side-by-side
server/web2py/applications/vidjil/models/db.py
View file @
5596d8fd
...
...
@@ -194,6 +194,9 @@ except:
import
logging
logging
.
ADMIN
=
logging
.
INFO
+
1
logging
.
addLevelName
(
logging
.
ADMIN
,
'ADMIN'
)
class
MsgUserAdapter
(
logging
.
LoggerAdapter
):
def
process
(
self
,
msg
,
kwargs
):
...
...
@@ -210,6 +213,8 @@ class MsgUserAdapter(logging.LoggerAdapter):
new_msg
=
'%30s %12s %s'
%
(
ip
,
(
'<%s>'
%
auth
.
user
.
first_name
.
replace
(
' '
,
'-'
)
if
auth
.
user
else
''
),
msg
)
return
new_msg
,
kwargs
def
admin
(
self
,
msg
):
self
.
log
(
logging
.
ADMIN
,
msg
)
#
def
_init_log
():
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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