Logging with the root logger, like logging.info, removes the possibility of controlling the log level of submodules separately. logging.getLogger(__name__) enables this (& is the recommended practice), by doing something like
logging.getLogger("path.to.the.module").setLevel(logging.INFO) or imported.module.LOGGER.setLevel(logging.INFO) after the basicConfig call
Logging with the root logger, like
logging.info
, removes the possibility of controlling the log level of submodules separately.logging.getLogger(__name__)
enables this (& is the recommended practice), by doing something likelogging.getLogger("path.to.the.module").setLevel(logging.INFO)
orimported.module.LOGGER.setLevel(logging.INFO)
after thebasicConfig
call