From ebb57f109517045d1d321b4fcb8b788e062ff079 Mon Sep 17 00:00:00 2001 From: ZhiQiang Fan Date: Wed, 4 Sep 2013 14:38:49 +0800 Subject: [PATCH] Add handler for heatclient.common.http If no handler is found, add StreamHandler to LOG Closes-Bug: #1220532 Change-Id: I32d541d242845b7311fd6810a5e87f07fafd8efd --- heatclient/common/http.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/heatclient/common/http.py b/heatclient/common/http.py index ecadd9f4..7aa5b879 100644 --- a/heatclient/common/http.py +++ b/heatclient/common/http.py @@ -41,6 +41,8 @@ from heatclient import exc LOG = logging.getLogger(__name__) +if not LOG.handlers: + LOG.addHandler(logging.StreamHandler()) USER_AGENT = 'python-heatclient' CHUNKSIZE = 1024 * 64 # 64kB