Commit 2c50c9be authored by Ryan Herbert's avatar 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
...@@ -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)
......
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