Qual è il modo più semplice per includere nome utente, nome e cognome e e-amil nell'errore django Traceback.Includi utente loggato django in django Errore Traceback
So che il modo in cui è create a custom error report:
- creare una nuova classe che innherit da django.views.debug.SafeExceptionReporterFilter
- Set DEFAULT_EXCEPTION_REPORTER_FILTER
Ma, quale metodo di dovrebbe sovrascrivere ricevere traceback con anche questa informazione?
Vorrei che il mio sguardo treceback piace:
Traceback (most recent call last):
File "/usr...o/core/handlers/base.py", line 89, in get_response
response = middleware_method(request)
File "/.../g...ap/utils/middleware.py", line 23,...
if elapsedTime.min > 15:
TypeError: can't compare datetime.timedelta to int
Logged user information:
User: pepito
name: Pepito Grillo
e-mail: [email protected]
Ecco un modo più pulito: http://stackoverflow.com/a/4946443/565259 – Tobu
@tobu, grazie mille. – danihp