Project

General

Profile

Evolution #5567

Limiter la propagation des exceptions par application

Added by Daniel Dehennin almost 8 years ago. Updated about 7 years ago.

Status:
Fermé
Priority:
Normal
Assigned To:
Category:
-
Start date:
Due date:
% Done:

100%

Distribution:
EOLE 2.4

Description

À l’heure actuelle, toutes les exceptions qui ne sont pas explicitement prise en charge par les applications arrivent dans les logs de gunicorn :

2013-06-11 15:09:48 [1346] [ERROR] Error handling request
Traceback (most recent call last):
  File "/usr/lib/pymodules/python2.7/gunicorn/workers/async.py", line 38, in handle
    self.handle_request(req, client, addr)
  File "/usr/lib/pymodules/python2.7/gunicorn/workers/async.py", line 64, in handle_request
    respiter = self.wsgi(environ, resp.start_response)
  File "/usr/lib/python2.7/dist-packages/werkzeug/wsgi.py", line 471, in __call__
    return app(environ, start_response)
  File "/usr/lib/python2.7/dist-packages/flask/app.py", line 1518, in __call__
    return self.wsgi_app(environ, start_response)
  File "/usr/lib/python2.7/dist-packages/flask/app.py", line 1506, in wsgi_app
    response = self.make_response(self.handle_exception(e))
  File "/usr/lib/python2.7/dist-packages/flask/app.py", line 1504, in wsgi_app
    response = self.full_dispatch_request()
  File "/usr/lib/python2.7/dist-packages/flask/app.py", line 1264, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/usr/lib/python2.7/dist-packages/flask/app.py", line 1262, in full_dispatch_request
    rv = self.dispatch_request()
  File "/usr/lib/python2.7/dist-packages/flask/app.py", line 1248, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "/usr/lib/python2.7/dist-packages/eolegenconfig/views.py", line 26, in categories
    raise StandardError("Dommage Élianne")
StandardError: Dommage Élianne

Maintenant que chaque application dispose de son propre fichier de log, il serait intéressant que les exceptions n’apparaissent que dans les logs de l’application concernée.

Sinon, si deux applications lèvent une exception en même temps, les deux traceback apparaîtront dans le même fichier de log, rendant le diagnostique plus difficile.

Associated revisions

Revision 5a8a54d8 (diff)
Added by laurent flori almost 8 years ago

Les exceptions ne sont plus propagées Fixes:#5567

  • les exceptions se limitent aux logs de leur application
  • le mode DEBUG est désactivé par le loader sinon la propagation
  • reprend

History

#1 Updated by Anonymous almost 8 years ago

  • Status changed from Nouveau to Résolu
  • % Done changed from 0 to 100

#2 Updated by Joël Cuissinat about 7 years ago

  • Status changed from Résolu to Fermé
  • Assigned To set to Laurent Flori
  • Target version set to Eole 2.4-RC1

OK

Also available in: Atom PDF