[Python-ideas] Efficient debug logging

Kyle Lahnakoski klahnakoski at mozilla.com
Thu Feb 16 13:54:45 EST 2017


On 2017-02-15 16:06, Abe Dillon wrote:
> On 15.02.2017, 20:39 Kyle Lahnakoski wrote:
>
>     Log "levels" never made sense to me; how can a single dimension be
>     useful substitute for a number of binary switches?  With log
>     "levels", you either don't have enough logging, or you drown in
>     too much logging (or you manage a number of loggers, which is
>     worse than logging switches).
>
>
> Again, isn't that what Filters are for? I mean the documentation says:
>
>     |Filters| can be used by |Handlers| and |Loggers| for more
>     sophisticated filtering than is provided by levels. 
>
>

You are right that Python logging infrastructure can deal with logs at a
finer grain, but the code required to do it is more verbose than logical
switches, and may also be non-local, and still does not solve the
expensiveFunction() problem.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20170216/4e0d81b8/attachment.html>


More information about the Python-ideas mailing list