connection: add a debug option to debug boto calls

Basically setting debug level via conf file and setting a stream logger
prefixed with 'boto' for more debugging

Signed-off-by: Abhishek Lekshmanan <abhishek@suse.com>
This commit is contained in:
Abhishek Lekshmanan 2016-03-31 14:07:48 +02:00
parent cebb3dbb79
commit f7ef61a128

View file

@ -108,6 +108,9 @@ def connect(conf):
raise RuntimeError(
'calling_format unknown: %r' % raw_calling_format
)
if conf.has_key('debug'):
kwargs['debug']=conf['debug']
boto.set_stream_logger('boto')
# TODO test vhost calling format
conn = boto.s3.connection.S3Connection(**kwargs)
return conn