Commit 98a88020 authored by Mikaël Salson's avatar Mikaël Salson
Browse files

db.py: Put last names in logs

First name only is ok with a little number of users. When the user base grows,
there is ambiguity with the first names only.

See #2521.
parent 84a58b6a
......@@ -293,7 +293,8 @@ class MsgUserAdapter(logging.LoggerAdapter):
if ip.startswith(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():
usern = 'team!' + usern
new_msg = '%30s %12s %s' % (ip, ('<%s>' % usern), msg)
......
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