You called basicConfig()
with a level of logging.INFO
, which sets the effective level to INFO
for the root logger, and all descendant loggers which don't have explicitly set levels. This includes the requests
loggers, and explains why you're getting these results.
Instead, you can do
logging.basicConfig()
which will leave the level at its default value of WARNING
, but add a handler which outputs log messages to the console. Then, set the level on your logger to INFO
:
logger = logging.getLogger('BBProposalGenerator')
logger.setLevel(logging.INFO)
Now, INFO
and higher severity events logged to logger BBProposalGenerator
or any of its descendants will be printed, but the root logger (and other descendants of it, such as requests.XXX
) will remain at WARNING
level and only show WARNING
or higher messages.
Of course, you can specify a higher level in the basicConfig()
call - if you specified ERROR
, for example, you would only see ERROR
or higher from all the other loggers, but INFO
or higher from BBProposalGenerator
and its descendants.