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 that doesn't seem to help.
import boto
boto.set_file_logger('boto', 'logs/boto.log')
This says it is possible, http://developer.amazonwebservices.com/connect/thread.jspa?messageID=52727췷 but AFAIK the documentation doesnt tell how.
I move the boto3 answer from the comments (namely charneykaye and gene_wood) to a proper answer:
To get all the loggers follow the response from leobarcellos:
You could try
which will suppress all (other than CRITICAL) errors.
Boto uses logging configuration files (e.g.
/etc/boto.cfg
,~/.boto
) so see if you can configure it to your needs that way.The
set_file_logger
call simply adds a user-defined file to the logging setup, so you can't use that to turn logging off.Better yet, disable
propagate
for boto: