@receiver(user_logged_out)
def log_successful_logout(sender, request, user, **kwargs):
 if hasattr(request, 'user'):
  if settings.FEATURES['SQUELCH_PII_IN_LOGS']:
   AUDIT_LOG.info(u'Logout - user.id: {0}'.format(request.user.id))
  else:
   AUDIT_LOG.info(u'Logout - {0}'.format(request.user))

@ receiver ( user_logged_out ) def log_successful_logout ( sender , request , user , ** kwargs ) : if hasattr ( request , 'user' ) : if settings . FEATURES [ 'SQUELCH_PII_IN_LOGS' ] : AUDIT_LOG . info ( u'Logout - user.id: {0}' . format ( request . user . id ) ) else : AUDIT_LOG . info ( u'Logout - {0}' . format ( request . user ) )
handler to log when logouts have occurred successfully .