@receiver(user_logged_in)
def log_successful_login(sender, request, user, **kwargs):
 if settings.FEATURES['SQUELCH_PII_IN_LOGS']:
  AUDIT_LOG.info(u'Login success - user.id: {0}'.format(user.id))
 else:
  AUDIT_LOG.info(u'Login success - {0} ({1})'.format(user.username, user.email))

@ receiver ( user_logged_in ) def log_successful_login ( sender , request , user , ** kwargs ) : if settings . FEATURES [ 'SQUELCH_PII_IN_LOGS' ] : AUDIT_LOG . info ( u'Login success - user.id: {0}' . format ( user . id ) ) else : AUDIT_LOG . info ( u'Login success - {0} ({1})' . format ( user . username , user . email ) )
handler to log when logins have occurred successfully .