diff options
Diffstat (limited to 'swiftclient/client.py')
-rw-r--r-- | swiftclient/client.py | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/swiftclient/client.py b/swiftclient/client.py index eef5b6c..a95ce70 100644 --- a/swiftclient/client.py +++ b/swiftclient/client.py @@ -35,7 +35,22 @@ try: except ImportError: HTTPSConnectionNoSSLComp = HTTPSConnection + +try: + from logging import NullHandler +except ImportError: + class NullHandler(logging.Handler): + def handle(self, record): + pass + + def emit(self, record): + pass + + def createLock(self): + self.lock = None + logger = logging.getLogger("swiftclient") +logger.addHandler(NullHandler()) def http_log(args, kwargs, resp, body): |