> On 16 Feb 2017, at 21:03, Abe Dillon <abedil...@gmail.com> wrote: > > I personally don't see why you can't use floats for log levels, but I'm > interested to know how people are using logs such that they need dozens of > levels. That, however; is tangential to the discussion about conditional > execution of an expensive function.
Its not lots of levels its lots of categories. I did add one level, INFOHEADER, but not for debug. It you are interested in what I did you could look at this project: https://github.com/barry-scott/scm-workbench Have a look at: https://github.com/barry-scott/scm-workbench/blob/master/Source/Scm/wb_scm_debug.py https://github.com/barry-scott/scm-workbench/blob/master/Source/Common/wb_debug.py Then look at almost any module and see the use of the _debug calls. Barry
_______________________________________________ Python-ideas mailing list Python-ideas@python.org https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/