Commit 2406db97 authored by Stavros Sachtouris's avatar Stavros Sachtouris
Browse files

Disable token logging (synnefo bug #3480)

parent f09da8c8
......@@ -41,7 +41,9 @@ from kamaki.clients.connection.kamakicon import KamakiHTTPConnection
from kamaki.clients.connection.errors import KamakiConnectionError
from kamaki.clients.connection.errors import KamakiResponseError
LOG_TOKEN = False
DEBUG_LOG = get_log_filename()
add_file_logger('clients.send', __name__, filename=DEBUG_LOG)
sendlog = get_logger('clients.send')
sendlog.debug('Logging location: %s' % DEBUG_LOG)
......@@ -224,6 +226,8 @@ class Client(object):
headers.update(async_headers)
for key, val in headers.items():
if (not LOG_TOKEN) and key.lower() == 'x-auth-token':
continue
sendlog.info('\t%s: %s', key, val)
sendlog.info('')
if data:
......@@ -231,6 +235,8 @@ class Client(object):
recvlog.info('%d %s', r.status_code, r.status)
for key, val in r.headers.items():
if (not LOG_TOKEN) and key.lower() == 'x-auth-token':
continue
recvlog.info('%s: %s', key, val)
if r.content:
datarecvlog.info(r.content)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment