Задать вопрос

Тел: +7 965 3737 888

468

Просмотров

2

Ответов

Log errors to a file

This is another example use of the exception middleware. It shows how to log exceptions to a file. Someone wanted to do this to avoid DOS-ing the email server in case of a silly error.

(untested.)

Вопрос полезен? Да0/Нет0
file_3360.py(829.0б)
None

Ответы (2):

Ответhenrikg:12.08.2008
Ответ полезен? Да0/Нет0

ruserious, you need to download snippet 638 as well, and then change the "from snippet 638 import..." in this snippet, to whatever you called your file with snippet 638. For example:

from myproject.middleware.snippet_638 import ...

Ответruserious:17.04.2008
Ответ полезен? Да0/Нет0

so ... the StandardExceptionMiddleware is not defined