This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Problems using logging module with logging.basicConfig(level=logging.NOTSET)
Type: behavior Stage:
Components: Library (Lib) Versions: Python 2.5
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: vinay.sajip Nosy List: panhudie, vinay.sajip
Priority: normal Keywords:

Created on 2008-03-14 13:57 by panhudie, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Messages (2)
msg63527 - (view) Author: panhudie (panhudie) Date: 2008-03-14 13:57
The problem is in the logging.basicConfig(**kwargs):

    <...>
    level = kwargs.get("level")
    if level:
        root.setLevel(level)

So you can not set the level like this, this logger will log WARNING(and
above) instead of all the level:

     logging.basicConfig(level=logging.NOTSET)
     #logging.NOTSET == 0, root default level is WARNING

I have seen this problem was fixed in the trunk, but not in python25 branch:

    level = kwargs.get("level")
    if level is not None:
        root.setLevel(level)
msg63602 - (view) Author: Vinay Sajip (vinay.sajip) * (Python committer) Date: 2008-03-16 21:41
Updated release25-maint.
History
Date User Action Args
2022-04-11 14:56:31adminsetgithub: 46540
2008-03-16 21:41:01vinay.sajipsetstatus: open -> closed
assignee: vinay.sajip
resolution: fixed
messages: + msg63602
nosy: + vinay.sajip
2008-03-14 13:57:07panhudiecreate