This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author gvanrossum
Recipients Mariatta, grismar, gvanrossum, orsenthil, r.david.murray
Date 2016-10-01.15:35:33
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <CAP7+vJ+K8_bAZYmWzbMxoGZSy9Eo9wyKQyDC+9sbChPOy5xccw@mail.gmail.com>
In-reply-to <1475326862.34.0.209267071121.issue28294@psf.upfronthosting.co.za>
Content
A problem with switching to logging is the API design.

There are three functions, log_request(), log_error() and
log_message(). The former two call the latter. The API explicitly
encourages overriding log_message() to customize logging. But it has
no way to know whether it's called from log_error(), log_request(), or
directly.

So how is it to choose logging levels? I imagine log_request() should
log at the INFO level, log_error() at the ERROR level, and let's say
that direct calls to log_message() should also log at the INFO level
(from looking at the few calls). So how should log_error() distinguish
itself to log_message() without breaking apps that override the
latter?
History
Date User Action Args
2016-10-01 15:35:33gvanrossumsetrecipients: + gvanrossum, orsenthil, r.david.murray, Mariatta, grismar
2016-10-01 15:35:33gvanrossumlinkissue28294 messages
2016-10-01 15:35:33gvanrossumcreate