Disable boto logging without modifying the boto files

后端 未结 6 491
野趣味
野趣味 2020-12-23 17:20

I am using the Boto library to talk to AWS. I want to disable logging. (Or redirect to /dev/null or other file). I cant find an obvious way to do this. I tried this, but tha

6条回答
  •  再見小時候
    2020-12-23 17:53

    Better yet, disable propagate for boto:

    import boto
    boto.set_file_logger('boto', 'logs/boto.log')
    logging.getLogger('boto').propagate = False
    

提交回复
热议问题