'action': action, 'timestamp': datetime.utcnow() } if message is not None: data['message'] = message if request: data['ip'] = get_request().remote_addr user = get_current_user() if user is not None: data['user'] = User db.session.add(LogMessage(**data))
if user is not None: return user.language request = get_current_request() if request and request.accept_languages: return request.accept_languages[0] return 'en_US'
git:master+? workon sentry $ git ci -am 'Performance improvements to the data scrubber.' src/sentry/utils/data_scrubber.py:147:1: F401 'unused' imported but unused