I use several modules in my project, however, the modules output lots of logs from the logger, which is annoying. So I turn off the logs by:
boto_log = logging.getLogger("boto")
boto_log.setLevel(logging.CRITICAL)
es_log = logging.getLogger("elasticsearch")
es_log.setLevel(logging.CRITICAL)
urllib3_log = logging.getLogger("urllib3")
urllib3_log.setLevel(logging.CRITICAL)
Though this works, the code looks verbose. Is there any better, simpler way I can do this?