[New-bugs-announce] [issue14760] logging: make setLevel() return handler itself for chained configuration

anatoly techtonik report at bugs.python.org
Wed May 9 09:15:19 CEST 2012


New submission from anatoly techtonik <techtonik at gmail.com>:

It would be convenient if instead of:

    hdlr = logging.StreamHandler()
    hglr.setLevel(logging.DEBUG)
    root.addHandler(hdlr)

it would be possible to write:

    root.addHandler(logging.StreamHandler().setLevel(logging.DEBUG))

----------
components: Library (Lib)
messages: 160252
nosy: techtonik
priority: normal
severity: normal
status: open
title: logging: make setLevel() return handler itself for chained configuration

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue14760>
_______________________________________


More information about the New-bugs-announce mailing list