Should not it be handled by a single import? i.e. import logging. If I do not include import logging.config in my script, it gives :
AttributeError: 'module' object has no attribute 'config'
Should not it be handled by a single import? i.e. import logging. If I do not include import logging.config in my script, it gives :
AttributeError: 'module' object has no attribute 'config'
logging
is a package. Modules in packages aren't imported until you (or something in your program) imports them. You don't need both import logging
and import logging.config
though: just import logging.config
will make the name logging
available already.