没有邮件使用django.utils.log.AdminEmailHandler发送

时间:2015-10-08 14:01:13

标签: python django email logging

我正在尝试使用django.utils.log.AdminEmailHandler向500上的admin发送错误消息,但无法弄清楚django docs返回状态= status.HTTP_500_INTERNAL_SERVER_ERROR来自get call to raise error的错误

这是代码:

<leaflet-map id="map">

...

testmove: function(e) {
  var text = 'Center: ' + this.$.map.latitude.toFixed(9)
                       + ', ' + this.$.map.longitude.toFixed(9); 
  console.log(text);
}

1 个答案:

答案 0 :(得分:-1)

您的记录器正在寻找DEBUG级别。 5xx响应错误属于ERROR级别。

https://docs.djangoproject.com/en/1.8/topics/logging/#django-request