[issue30862] parent logger should also check the level

2017-12-07 Thread Vinay Sajip
Vinay Sajip added the comment: basicConfig() provides default behaviour for simple cases. If you don't like the defaults it provides, you can choose your own configuration code to do exactly what you want. -- ___ Python tracker

[issue30862] parent logger should also check the level

2017-12-06 Thread TaoQingyun
TaoQingyun <845767...@qq.com> added the comment: Sorry to disturb. When calling `logging.basicConfig(level=logging.ERROR)`, I expect only the ERROR or above level will be logged. so the level argument if set should also pass to the handler. -- ___ P

[issue30862] parent logger should also check the level

2017-12-06 Thread Vinay Sajip
Vinay Sajip added the comment: > Maybe I misunderstand. I think you do misunderstand. The level of the handler created by basicConfig doesn't have any level set, so it will process any message it is asked to handle. This is working as designed. -- ___

[issue30862] parent logger should also check the level

2017-12-03 Thread TaoQingyun
TaoQingyun <845767...@qq.com> added the comment: Maybe I misunderstand. At least the basicConfig should also set the level of the handler that it created. -- ___ Python tracker ___

[issue30862] parent logger should also check the level

2017-07-06 Thread Vinay Sajip
Vinay Sajip added the comment: New changeset 0653fba51c03d20fa4381ba0836acd17fd05b04b by Vinay Sajip in branch 'master': bpo-30862: Updated Logger.setLevel documentation. (GH-2604) https://github.com/python/cpython/commit/0653fba51c03d20fa4381ba0836acd17fd05b04b -- __

[issue30862] parent logger should also check the level

2017-07-06 Thread Vinay Sajip
Changes by Vinay Sajip : -- pull_requests: +2672 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.p

[issue30862] parent logger should also check the level

2017-07-06 Thread R. David Murray
R. David Murray added the comment: @qingyunha: we are telling you that that would *introduce* a bug. This is working the way it is supposed to. Vinay, what if we rewrote the beginning of that paragraph like this: Sets the threshold for this logger to lvl. Logging messages which are less seve

[issue30862] parent logger should also check the level

2017-07-06 Thread TaoQingyun
TaoQingyun added the comment: yes, I understand the effective level. my question is that before call ancestor's handler, should also check `c.isEnabledFor(record.levelno)` ``` def callHandlers(self, record): """ Pass a record to all relevant handlers. Loop through a

[issue30862] parent logger should also check the level

2017-07-06 Thread Vinay Sajip
Vinay Sajip added the comment: As RDM says, this behaviour is as designed. The logger's setLevel documentation says: "Sets the threshold for this logger to lvl. Logging messages which are less severe than lvl will be ignored. When a logger is created, the level is set to NOTSET (which causes

[issue30862] parent logger should also check the level

2017-07-05 Thread R. David Murray
R. David Murray added the comment: I will let Vinay answer definitively, but this is working as designed. This allows you to set 'debug' level on a sub-logger without getting debug output for every logger in your system, which is what you would get otherwise as the default logging level is NO

[issue30862] parent logger should also check the level

2017-07-05 Thread Ned Deily
Changes by Ned Deily : -- nosy: +vinay.sajip ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pytho

[issue30862] parent logger should also check the level

2017-07-05 Thread TaoQingyun
New submission from TaoQingyun: ``` import logging logging.basicConfig(level=logging.ERROR) l = logging.getLogger("test") l.setLevel(logging.DEBUG) l.debug("Hello world") ``` it will print 'Hello world' -- ___ Python tracker

[issue30862] parent logger should also check the level

2017-07-05 Thread TaoQingyun
Changes by TaoQingyun <845767...@qq.com>: -- components: Library (Lib) nosy: qingyunha priority: normal severity: normal status: open title: parent logger should also check the level type: behavior ___ Python tracker