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
2c50c9be
Commit
2c50c9be
authored
Jul 06, 2017
by
Ryan Herbert
Browse files
Merge branch 'feature-s/logs_last_name' into 'dev'
db.py: Put last names in logs Closes
#2521
See merge request
!62
parents
ababcd06
98a88020
Changes
1
Show whitespace changes
Inline
Side-by-side
server/web2py/applications/vidjil/models/db.py
View file @
2c50c9be
...
@@ -293,7 +293,8 @@ class MsgUserAdapter(logging.LoggerAdapter):
...
@@ -293,7 +293,8 @@ class MsgUserAdapter(logging.LoggerAdapter):
if
ip
.
startswith
(
ip_prefix
):
if
ip
.
startswith
(
ip_prefix
):
ip
=
"%s/%s"
%
(
ip
,
ips
[
ip_prefix
])
ip
=
"%s/%s"
%
(
ip
,
ips
[
ip_prefix
])
usern
=
auth
.
user
.
first_name
.
replace
(
' '
,
'-'
)
if
auth
.
user
else
''
usern
=
(
auth
.
user
.
first_name
+
'_'
+
auth
.
user
.
last_name
)
if
auth
.
user
else
''
usern
=
usern
.
replace
(
' '
,
'-'
)
if
auth
.
is_impersonating
():
if
auth
.
is_impersonating
():
usern
=
'team!'
+
usern
usern
=
'team!'
+
usern
new_msg
=
'%30s %12s %s'
%
(
ip
,
(
'<%s>'
%
usern
),
msg
)
new_msg
=
'%30s %12s %s'
%
(
ip
,
(
'<%s>'
%
usern
),
msg
)
...
...
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