From 1c300bca85d0d0d568d43f0df5fd8f900a7238a3 Mon Sep 17 00:00:00 2001 From: Michael Cetrulo Date: Wed, 12 Dec 2012 12:46:08 -0800 Subject: [PATCH] adding ExceptionModule --- devserver/modules/exception.py | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 devserver/modules/exception.py diff --git a/devserver/modules/exception.py b/devserver/modules/exception.py new file mode 100644 index 0000000..6b5ec3a --- /dev/null +++ b/devserver/modules/exception.py @@ -0,0 +1,11 @@ +from devserver.modules import DevServerModule + +class ExceptionModule(DevServerModule): + """ + Logs view exceptions. + """ + + logger_name = 'exception' + + def process_exception(self, request, exception): + self.logger.error(exception)