Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Log the URL used for the api request.

  • Loading branch information...
commit e391c8b3b8d5b92b9b37af42560778c47520f0c8 1 parent a6fb547
Ash Christopher ashchristopher authored
Showing with 4 additions and 0 deletions.
  1. +4 −0 bottlenose/api.py
4 bottlenose/api.py 100644 → 100755
View
@@ -9,6 +9,7 @@
import hmac
import time
import socket
+import logging
from hashlib import sha256
@@ -79,6 +80,8 @@ def __getattr__(self, k):
Style=self.Style, Region=self.Region, Timeout=self.Timeout)
def __call__(self, **kwargs):
+ logger = logging.getLogger(__name__)
+
kwargs['Timestamp'] = time.strftime("%Y-%m-%dT%H:%M:%SZ", time.gmtime())
kwargs['Operation'] = self.Operation
kwargs['Version'] = self.Version
@@ -110,6 +113,7 @@ def __call__(self, **kwargs):
api_request = urllib2.Request(api_string, headers={"Accept-Encoding": "gzip"})
if self.Timeout:
socket.setdefaulttimeout(self.Timeout)
+ logger.debug("Amazon URL: %s" % api_string)
response = urllib2.urlopen(api_request)
if self.Timeout:
socket.setdefaulttimeout(None)
Please sign in to comment.
Something went wrong with that request. Please try again.