About NOTSET in python logging
问题 As the logger.setLevel doc says: When a logger is created, the level is set to NOTSET (which causes all messages to be processed when the logger is the root logger, or delegation to the parent when the logger is a non-root logger). Note that the root logger is created with level WARNING. so I think if I create a root logger, with level NOTSET, the debug and info log will display. The code use basicConfig to set root logger's level to NOTSET is right: #!/usr/bin/env python # -*- coding: utf-8