equal
deleted
inserted
replaced
11 # Unless required by applicable law or agreed to in writing, software |
11 # Unless required by applicable law or agreed to in writing, software |
12 # distributed under the License is distributed on an "AS IS" BASIS, |
12 # distributed under the License is distributed on an "AS IS" BASIS, |
13 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
13 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
14 # See the License for the specific language governing permissions and |
14 # See the License for the specific language governing permissions and |
15 # limitations under the License. |
15 # limitations under the License. |
|
16 |
|
17 """Main Melange module with profiling support. |
|
18 """ |
16 |
19 |
17 __authors__ = [ |
20 __authors__ = [ |
18 # alphabetical order by last name, please |
21 # alphabetical order by last name, please |
19 '"Augie Fackler" <durin42@gmail.com>', |
22 '"Augie Fackler" <durin42@gmail.com>', |
20 ] |
23 ] |
50 import django.core.signals |
53 import django.core.signals |
51 import django.db |
54 import django.db |
52 |
55 |
53 # Log errors. |
56 # Log errors. |
54 def log_exception(*args, **kwds): |
57 def log_exception(*args, **kwds): |
|
58 """Function used for logging exceptions. |
|
59 """ |
55 logging.exception('Exception in request:') |
60 logging.exception('Exception in request:') |
56 |
61 |
57 # Log all exceptions detected by Django. |
62 # Log all exceptions detected by Django. |
58 django.core.signals.got_request_exception.connect(log_exception) |
63 django.core.signals.got_request_exception.connect(log_exception) |
59 |
64 |