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.
_______________________________________________ Python-ideas mailing list Python-ideas@python.org https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/