diff options
author | hongbo tian <hongbo.tianhongbo@huawei.com> | 2017-01-14 01:52:26 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@opnfv.org> | 2017-01-14 01:52:26 +0000 |
commit | 0559cd7924467392659716115936c4ae1312a513 (patch) | |
tree | 61af6673adab587a34e92d99e088fc84730e28b9 /dashboard | |
parent | 60f1f328b2ebc94330dcbf5f4374684a410d3e92 (diff) | |
parent | 3114be6f8c77962e27551645af1859c51a110600 (diff) |
Merge "dovetail tool: switch logging to proper usage"
Diffstat (limited to 'dashboard')
-rwxr-xr-x | dashboard/backend/dovetail/api/api.py | 4 | ||||
-rwxr-xr-x | dashboard/backend/dovetail/db/api.py | 4 | ||||
-rwxr-xr-x | dashboard/backend/dovetail/db/utils.py | 4 |
3 files changed, 6 insertions, 6 deletions
diff --git a/dashboard/backend/dovetail/api/api.py b/dashboard/backend/dovetail/api/api.py index 4fc97ebd..7839b893 100755 --- a/dashboard/backend/dovetail/api/api.py +++ b/dashboard/backend/dovetail/api/api.py @@ -104,7 +104,7 @@ def add_result(): data = _get_request_data() ret_code = 200 json_object = json.loads(data) - logging.debug('json_object:%s' % (json_object)) + logging.debug('json_object:%s', (json_object)) if not db_api.store_result(**json_object): ret_code = 500 resp = utils.make_json_response( @@ -116,7 +116,7 @@ def add_result(): @app.route("/results/<test_id>", methods=['DELETE']) def remove_results(test_id): data = _get_request_data() - logging.debug('data:%s' % data) + logging.debug('data:%s', data) response = db_api.del_result( test_id, **data ) diff --git a/dashboard/backend/dovetail/db/api.py b/dashboard/backend/dovetail/db/api.py index a522a481..631ed2a3 100755 --- a/dashboard/backend/dovetail/db/api.py +++ b/dashboard/backend/dovetail/db/api.py @@ -25,7 +25,7 @@ def store_result(exception_when_existing=True, :param data: Dict describes test results. """ - logging.debug('store_result:%s' % kwargs) + logging.debug('store_result:%s', kwargs) result = utils.add_db_object( session, models.Result, exception_when_existing, **kwargs) @@ -38,7 +38,7 @@ def store_result(exception_when_existing=True, def list_results(session=None, **filters): """Get all results """ - logging.debug('session:%s' % session) + logging.debug('session:%s', session) results = utils.list_db_objects( session, models.Result, **filters ) diff --git a/dashboard/backend/dovetail/db/utils.py b/dashboard/backend/dovetail/db/utils.py index 5e788a71..4bb0026d 100755 --- a/dashboard/backend/dovetail/db/utils.py +++ b/dashboard/backend/dovetail/db/utils.py @@ -47,7 +47,7 @@ def add_db_object(session, table, exception_when_existing=True, arg_names, args) ) db_keys = dict(zip(arg_names, args)) - logging.debug('db_keys:%s' % db_keys) + logging.debug('db_keys:%s', db_keys) if db_keys: db_object = session.query(table).filter_by(**db_keys).first() else: @@ -70,7 +70,7 @@ def add_db_object(session, table, exception_when_existing=True, for key, value in kwargs.items(): setattr(db_object, key, value) - logging.debug('db_object:%s' % db_object) + logging.debug('db_object:%s', db_object) if new_object: session.add(db_object) session.flush() |