From 495b8d97abd404ab5b2228675d91e3073d14a226 Mon Sep 17 00:00:00 2001 From: debugtalk Date: Thu, 21 Sep 2017 15:59:13 +0800 Subject: [PATCH] print_output defaults to debug level --- ate/utils.py | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/ate/utils.py b/ate/utils.py index 835335c1..202c5465 100644 --- a/ate/utils.py +++ b/ate/utils.py @@ -4,6 +4,7 @@ import hmac import imp import importlib import json +import logging import os.path import random import re @@ -382,9 +383,9 @@ def print_output(output): if not output: return - print("\n================== Output ==================") - print('{:<16}: {:<}'.format("Variable", "Value")) - print('{:<16}: {:<}'.format("--------", "-----")) + content = "\n================== Output ==================\n" + content += '{:<16}: {:<}\n'.format("Variable", "Value") + content += '{:<16}: {:<}\n'.format("--------", "-----") for variable, value in output.items(): @@ -394,6 +395,8 @@ def print_output(output): if isinstance(value, unicode): value = value.encode("utf-8") - print('{:<16}: {:<}'.format(variable, value)) + content += '{:<16}: {:<}\n'.format(variable, value) - print("============================================\n") + content += "============================================\n" + + logging.debug(content)